| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
gint camel_strcase_equal (gconstpointer a,gconstpointer b); guint camel_strcase_hash (gconstpointer v); void camel_string_list_free (GList *string_list); gchar * camel_strstrcase (const gchar *haystack,const gchar *needle); const gchar * camel_strdown (gchar *str); gchar camel_tolower (gchar c); gchar camel_toupper (gchar c); const gchar * camel_pstring_add (gchar *string,gboolean own); const gchar * camel_pstring_strdup (const gchar *string); void camel_pstring_free (const gchar *string); const gchar * camel_pstring_peek (const gchar *string); void camel_pstring_dump_stat (void);
const gchar * camel_pstring_add (gchar *string,gboolean own);
Add string to the pool.
The NULL and empty strings are special cased to constant values.
Unreference the returned string with camel_pstring_free().
|
string to add to the string pool |
|
whether the string pool will own the memory pointed to by
string, if string is not yet in the pool |
Returns : |
a canonicalized copy of string
|
const gchar * camel_pstring_strdup (const gchar *string);
Create a new pooled string entry for strings. A pooled string
is a table where common strings are canonicalized. They are also
reference counted and freed when no longer referenced.
The NULL and empty strings are special cased to constant values.
Unreference the returned string with camel_pstring_free().
|
string to copy |
Returns : |
a canonicalized copy of string
|
void camel_pstring_free (const gchar *string);
Unreferences a pooled string. If the string's reference count drops to
zero it will be deallocated. NULL and the empty string are special cased.
|
string to free |
const gchar * camel_pstring_peek (const gchar *string);
Returns the canonicalized copy of string without increasing its
reference count in the string pool. If necessary, string is first
added to the string pool.
The NULL and empty strings are special cased to constant values.
|
string to fetch from the string pool |
Returns : |
a canonicalized copy of string
|
Since 2.24