String
A GString
is an object that handles the memory management of a C string.
The emphasis of GString
is on text, typically UTF-8. Crucially, the "str" member of a GString
is guaranteed to have a trailing nul character, and it is therefore always safe to call functions such as strchr()
or strdup()
on it.
However, a GString
can also hold arbitrary binary data, because it has a "len" member, which includes any possible embedded nul characters in the data. Conceptually then, GString
is like a GByteArray
with the addition of many convenience methods for text, and a guaranteed nul terminator.
Skipped during bindings generation
method
append
: C function g_string_append is ignoredmethod
append_c
: C function g_string_append_c is ignoredmethod
append_len
: C function g_string_append_len is ignoredmethod
append_unichar
: C function g_string_append_unichar is ignoredmethod
append_uri_escaped
: C function g_string_append_uri_escaped is ignoredmethod
ascii_down
: C function g_string_ascii_down is ignoredmethod
ascii_up
: C function g_string_ascii_up is ignoredmethod
assign
: C function g_string_assign is ignoredmethod
down
: C function g_string_down is ignoredmethod
equal
: C function g_string_equal is ignoredmethod
erase
: C function g_string_erase is ignoredmethod
free
: C function g_string_free is ignoredmethod
free_and_steal
: C function g_string_free_and_steal is ignoredmethod
free_to_bytes
: C function g_string_free_to_bytes is ignoredmethod
hash
: C function g_string_hash is ignoredmethod
insert
: C function g_string_insert is ignoredmethod
insert_c
: C function g_string_insert_c is ignoredmethod
insert_len
: C function g_string_insert_len is ignoredmethod
insert_unichar
: C function g_string_insert_unichar is ignoredmethod
overwrite
: C function g_string_overwrite is ignoredmethod
overwrite_len
: C function g_string_overwrite_len is ignoredmethod
prepend
: C function g_string_prepend is ignoredmethod
prepend_c
: C function g_string_prepend_c is ignoredmethod
prepend_len
: C function g_string_prepend_len is ignoredmethod
prepend_unichar
: C function g_string_prepend_unichar is ignoredmethod
replace
: C function g_string_replace is ignoredmethod
set_size
: C function g_string_set_size is ignoredmethod
truncate
: C function g_string_truncate is ignoredmethod
up
: C function g_string_up is ignoredconstructor
new
: C function g_string_new is ignoredconstructor
new_len
: C function g_string_new_len is ignoredconstructor
new_take
: C function g_string_new_take is ignoredconstructor
sized_new
: C function g_string_sized_new is ignored