<refentry id="camel-camel-string-utils">
<refmeta>
<refentrytitle role="top_of_page" id="camel-camel-string-utils.top_of_page">camel-string-utils</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAMEL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>camel-string-utils</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv id="camel-camel-string-utils.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
<link linkend="int">int</link>                 <link linkend="camel-strcase-equal">camel_strcase_equal</link>                 (<link linkend="gconstpointer">gconstpointer</link> a,
                                                         <link linkend="gconstpointer">gconstpointer</link> b);
<link linkend="guint">guint</link>               <link linkend="camel-strcase-hash">camel_strcase_hash</link>                  (<link linkend="gconstpointer">gconstpointer</link> v);
<link linkend="void">void</link>                <link linkend="camel-string-list-free">camel_string_list_free</link>              (<link linkend="GList">GList</link> *string_list);
<link linkend="char">char</link> *              <link linkend="camel-strstrcase">camel_strstrcase</link>                    (const <link linkend="char">char</link> *haystack,
                                                         const <link linkend="char">char</link> *needle);
const <link linkend="char">char</link> *        <link linkend="camel-strdown">camel_strdown</link>                       (<link linkend="char">char</link> *str);
<link linkend="char">char</link>                <link linkend="camel-tolower">camel_tolower</link>                       (<link linkend="char">char</link> c);
<link linkend="char">char</link>                <link linkend="camel-toupper">camel_toupper</link>                       (<link linkend="char">char</link> c);
const <link linkend="char">char</link> *        <link linkend="camel-pstring-add">camel_pstring_add</link>                   (<link linkend="char">char</link> *str,
                                                         <link linkend="gboolean">gboolean</link> own);
const <link linkend="char">char</link> *        <link linkend="camel-pstring-strdup">camel_pstring_strdup</link>                (const <link linkend="char">char</link> *s);
<link linkend="void">void</link>                <link linkend="camel-pstring-free">camel_pstring_free</link>                  (const <link linkend="char">char</link> *s);
const <link linkend="char">char</link> *        <link linkend="camel-pstring-peek">camel_pstring_peek</link>                  (const <link linkend="char">char</link> *str);
</synopsis>
</refsynopsisdiv>









<refsect1 id="camel-camel-string-utils.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>

<refsect1 id="camel-camel-string-utils.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="camel-strcase-equal" role="function">
<title>camel_strcase_equal ()</title>
<indexterm zone="camel-strcase-equal"><primary sortas="camel_strcase_equal">camel_strcase_equal</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_strcase_equal                 (<link linkend="gconstpointer">gconstpointer</link> a,
                                                         <link linkend="gconstpointer">gconstpointer</link> b);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-strcase-hash" role="function">
<title>camel_strcase_hash ()</title>
<indexterm zone="camel-strcase-hash"><primary sortas="camel_strcase_hash">camel_strcase_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               camel_strcase_hash                  (<link linkend="gconstpointer">gconstpointer</link> v);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>v</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-string-list-free" role="function">
<title>camel_string_list_free ()</title>
<indexterm zone="camel-string-list-free"><primary sortas="camel_string_list_free">camel_string_list_free</primary></indexterm><programlisting><link linkend="void">void</link>                camel_string_list_free              (<link linkend="GList">GList</link> *string_list);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>string_list</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-strstrcase" role="function">
<title>camel_strstrcase ()</title>
<indexterm zone="camel-strstrcase"><primary sortas="camel_strstrcase">camel_strstrcase</primary></indexterm><programlisting><link linkend="char">char</link> *              camel_strstrcase                    (const <link linkend="char">char</link> *haystack,
                                                         const <link linkend="char">char</link> *needle);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>haystack</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>needle</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-strdown" role="function">
<title>camel_strdown ()</title>
<indexterm zone="camel-strdown"><primary sortas="camel_strdown">camel_strdown</primary></indexterm><programlisting>const <link linkend="char">char</link> *        camel_strdown                       (<link linkend="char">char</link> *str);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-tolower" role="function">
<title>camel_tolower ()</title>
<indexterm zone="camel-tolower"><primary sortas="camel_tolower">camel_tolower</primary></indexterm><programlisting><link linkend="char">char</link>                camel_tolower                       (<link linkend="char">char</link> c);</programlisting>
<para>
ASCII to-lower function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>c</parameter>&#160;:</term>
<listitem><simpara> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-toupper" role="function">
<title>camel_toupper ()</title>
<indexterm zone="camel-toupper"><primary sortas="camel_toupper">camel_toupper</primary></indexterm><programlisting><link linkend="char">char</link>                camel_toupper                       (<link linkend="char">char</link> c);</programlisting>
<para>
ASCII to-upper function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>c</parameter>&#160;:</term>
<listitem><simpara> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-pstring-add" role="function">
<title>camel_pstring_add ()</title>
<indexterm zone="camel-pstring-add"><primary sortas="camel_pstring_add">camel_pstring_add</primary></indexterm><programlisting>const <link linkend="char">char</link> *        camel_pstring_add                   (<link linkend="char">char</link> *str,
                                                         <link linkend="gboolean">gboolean</link> own);</programlisting>
<para>
Add the string to the pool.
</para>
<para>
The NULL and empty strings are special cased to constant values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> string to add to the string pool
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>own</parameter>&#160;:</term>
<listitem><simpara> whether the string pool will own the memory pointed to by <parameter>str</parameter>, if <parameter>str</parameter> is not yet in the pool
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A pointer to an equivalent string of <parameter>s</parameter>.  Use
<link linkend="camel-pstring-free"><function>camel_pstring_free()</function></link> when it is no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-pstring-strdup" role="function">
<title>camel_pstring_strdup ()</title>
<indexterm zone="camel-pstring-strdup"><primary sortas="camel_pstring_strdup">camel_pstring_strdup</primary></indexterm><programlisting>const <link linkend="char">char</link> *        camel_pstring_strdup                (const <link linkend="char">char</link> *s);</programlisting>
<para>
Create a new pooled string entry for the string <parameter>s</parameter>.  A pooled
string is a table where common strings are uniquified to the same
pointer value.  They are also refcounted, so freed when no longer
in use.  In a thread-safe manner.
</para>
<para>
The NULL and empty strings are special cased to constant values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>s</parameter>&#160;:</term>
<listitem><simpara> String to copy.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A pointer to an equivalent string of <parameter>s</parameter>.  Use
<link linkend="camel-pstring-free"><function>camel_pstring_free()</function></link> when it is no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-pstring-free" role="function">
<title>camel_pstring_free ()</title>
<indexterm zone="camel-pstring-free"><primary sortas="camel_pstring_free">camel_pstring_free</primary></indexterm><programlisting><link linkend="void">void</link>                camel_pstring_free                  (const <link linkend="char">char</link> *s);</programlisting>
<para>
De-ref a pooled string. If no more refs exist to this string, it will be deallocated.
</para>
<para>
NULL and the empty string are special cased.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>s</parameter>&#160;:</term>
<listitem><simpara> String to free.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-pstring-peek" role="function">
<title>camel_pstring_peek ()</title>
<indexterm zone="camel-pstring-peek"><primary sortas="camel_pstring_peek">camel_pstring_peek</primary></indexterm><programlisting>const <link linkend="char">char</link> *        camel_pstring_peek                  (const <link linkend="char">char</link> *str);</programlisting>
<para>
Add return the string from the pool.
</para>
<para>
The NULL and empty strings are special cased to constant values.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> string to fetch to the string pool
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A pointer to an equivalent string of <parameter>s</parameter>.  Use
<link linkend="camel-pstring-free"><function>camel_pstring_free()</function></link> when it is no longer needed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
