<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_string__util_8cpp">
<title>/Users/bernard/b20/bsoft/src/util/string_util.cpp File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/src/util/string_util.cpp</primary></indexterm>
<programlisting>#include &quot;string_util.h&quot;
#include &quot;utilities.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>string <link linkend="_string__util_8cpp_1a6eef8ea11c68c89651c36ccfdc3cee50">command_line</link> (int argc, char **argv)</para>
</listitem>
            <listitem><para>string <link linkend="_string__util_8cpp_1ae1cd0165442272bf85dc2d9461080a30">base</link> (string &amp;filename)</para>
</listitem>
            <listitem><para>string <link linkend="_string__util_8cpp_1ab30020fd87c6f8c8103f47511efdefee">extension</link> (string filename)</para>
</listitem>
            <listitem><para>string <link linkend="_string__util_8cpp_1a162dcecbdeb304e4033aa0e5b315921b">replace_extension</link> (string &amp;filename, string ext)</para>
</listitem>
            <listitem><para>string <link linkend="_string__util_8cpp_1aa2a74928dfc358c70ae6791fa53b6be9">insert</link> (string &amp;filename, string ins)</para>
</listitem>
            <listitem><para>string <link linkend="_string__util_8cpp_1af2ab77a0e5514c282dfe7ccbc1a32ccd">parameter_file_path</link> (string &amp;filename)</para>

<para>Finds the parameter file path. </para>
</listitem>
            <listitem><para>vector&lt; string &gt; <link linkend="_string__util_8cpp_1a21228818f6b97bdd706d7980b74a2966">split</link> (const string &amp;s)</para>

<para>Splits a string on whitespace. </para>
</listitem>
            <listitem><para>vector&lt; string &gt; <link linkend="_string__util_8cpp_1add313f0fe82466f4c1c4622307d928bc">split</link> (const string &amp;s, char delim)</para>

<para>Splits a string using a given delimiter. </para>
</listitem>
            <listitem><para>vector&lt; long &gt; <link linkend="_string__util_8cpp_1a9d5eff7133a0b8a4d33c069b8d4439c4">parse_integer_vector</link> (string vecstr)</para>
</listitem>
            <listitem><para>vector&lt; double &gt; <link linkend="_string__util_8cpp_1a7ec44f35aa4a83ba7a41d9b65a518c09">parse_real_vector</link> (string vecstr)</para>
</listitem>
            <listitem><para>string <link linkend="_string__util_8cpp_1adc3fd57a35218372099d601d143a1919">local_time</link> ()</para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_string__util_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>20160911 - 20180330 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_string__util_8cpp_1ae1cd0165442272bf85dc2d9461080a30"/>    <section>
    <title>base()</title>
<indexterm><primary>base</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>base</secondary></indexterm>
<para><computeroutput>string base (string &amp; filename)</computeroutput></para><para>
Definition at line 28 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1a6eef8ea11c68c89651c36ccfdc3cee50"/>    <section>
    <title>command_line()</title>
<indexterm><primary>command_line</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>command_line</secondary></indexterm>
<para><computeroutput>string command_line (int argc, char ** argv)</computeroutput></para><para>
Definition at line 16 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1ab30020fd87c6f8c8103f47511efdefee"/>    <section>
    <title>extension()</title>
<indexterm><primary>extension</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>extension</secondary></indexterm>
<para><computeroutput>string extension (string filename)</computeroutput></para><para>
Definition at line 32 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1aa2a74928dfc358c70ae6791fa53b6be9"/>    <section>
    <title>insert()</title>
<indexterm><primary>insert</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>insert</secondary></indexterm>
<para><computeroutput>string insert (string &amp; filename, string ins)</computeroutput></para><para>
Definition at line 48 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1adc3fd57a35218372099d601d143a1919"/>    <section>
    <title>local_time()</title>
<indexterm><primary>local_time</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>local_time</secondary></indexterm>
<para><computeroutput>string local_time ( )</computeroutput></para><para>
Definition at line 143 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1af2ab77a0e5514c282dfe7ccbc1a32ccd"/>    <section>
    <title>parameter_file_path()</title>
<indexterm><primary>parameter_file_path</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>parameter_file_path</secondary></indexterm>
<para><computeroutput>string parameter_file_path (string &amp; filename)</computeroutput></para><para>

<para>Finds the parameter file path. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;filename</entry>
                                <entry>
<para>the parameter filename. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para><link linkend="_class_bstring">Bstring</link> the full path and file name. <literallayout><computeroutput>The parameter file path should primarily be defined in the environmental
variable &quot;BPARAM&quot;.
Otherwise a default is used which may or may not be valid.
The string returned has a length containing the path plus one byte.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 69 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1a9d5eff7133a0b8a4d33c069b8d4439c4"/>    <section>
    <title>parse_integer_vector()</title>
<indexterm><primary>parse_integer_vector</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>parse_integer_vector</secondary></indexterm>
<para><computeroutput>vector&lt;long&gt; parse_integer_vector (string vecstr)</computeroutput></para><para>
Definition at line 119 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1a7ec44f35aa4a83ba7a41d9b65a518c09"/>    <section>
    <title>parse_real_vector()</title>
<indexterm><primary>parse_real_vector</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>parse_real_vector</secondary></indexterm>
<para><computeroutput>vector&lt;double&gt; parse_real_vector (string vecstr)</computeroutput></para><para>
Definition at line 131 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1a162dcecbdeb304e4033aa0e5b315921b"/>    <section>
    <title>replace_extension()</title>
<indexterm><primary>replace_extension</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>replace_extension</secondary></indexterm>
<para><computeroutput>string replace_extension (string &amp; filename, string ext)</computeroutput></para><para>
Definition at line 41 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1a21228818f6b97bdd706d7980b74a2966"/>    <section>
    <title>split()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>split</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>split</secondary></indexterm>
<para><computeroutput>vector&lt;string&gt; split (const string &amp; s)</computeroutput></para><para>

<para>Splits a string on whitespace. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;s</entry>
                                <entry>
<para>string to be split. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>vector&lt;string&gt; vector of strings. </para>
</formalpara>
</para>
<para>
Definition at line 92 of file string_util.cpp.</para>
    </section><anchor xml:id="_string__util_8cpp_1add313f0fe82466f4c1c4622307d928bc"/>    <section>
    <title>split()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>split</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>split</secondary></indexterm>
<para><computeroutput>vector&lt;string&gt; split (const string &amp; s, char delim)</computeroutput></para><para>

<para>Splits a string using a given delimiter. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;s</entry>
                                <entry>
<para>string to be split. </para>
</entry>
                            </row>
                            <row>
                                <entry>delim</entry>
                                <entry>
<para>delimiter. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>vector&lt;string&gt; vector of strings. </para>
</formalpara>
</para>
<para>
Definition at line 106 of file string_util.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_string__util_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>string_util.cpp</secondary></indexterm>
<indexterm><primary>string_util.cpp</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
