camel-string-utils

camel-string-utils

Functions

Description

Functions

camel_strcase_equal ()

gint
camel_strcase_equal (gconstpointer a,
                     gconstpointer b);

camel_strcase_hash ()

guint
camel_strcase_hash (gconstpointer v);

camel_string_list_free ()

void
camel_string_list_free (GList *string_list);

camel_strstrcase ()

gchar *
camel_strstrcase (const gchar *haystack,
                  const gchar *needle);

camel_strdown ()

const gchar *
camel_strdown (gchar *str);

camel_tolower ()

gchar
camel_tolower (gchar c);

ASCII to-lower function.

Returns


camel_toupper ()

gchar
camel_toupper (gchar c);

ASCII to-upper function.

Returns


camel_pstring_add ()

const gchar *
camel_pstring_add (gchar *str,
                   gboolean own);

Add the string to the pool.

The NULL and empty strings are special cased to constant values.

Parameters

str

string to add to the string pool

 

own

whether the string pool will own the memory pointed to by str , if str is not yet in the pool

 

Returns

A pointer to an equivalent string of s . Use camel_pstring_free() when it is no longer needed.


camel_pstring_strdup ()

const gchar *
camel_pstring_strdup (const gchar *s);

Create a new pooled string entry for the string s . 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.

The NULL and empty strings are special cased to constant values.

Parameters

s

String to copy.

 

Returns

A pointer to an equivalent string of s . Use camel_pstring_free() when it is no longer needed.


camel_pstring_free ()

void
camel_pstring_free (const gchar *s);

De-ref a pooled string. If no more refs exist to this string, it will be deallocated.

NULL and the empty string are special cased.

Parameters

s

String to free.

 

camel_pstring_peek ()

const gchar *
camel_pstring_peek (const gchar *str);

Add return the string from the pool.

The NULL and empty strings are special cased to constant values.

Parameters

str

string to fetch to the string pool

 

Returns

A pointer to an equivalent string of s . Use camel_pstring_free() when it is no longer needed.

Since 2.24

Types and Values