StringBuilder


Object Hierarchy:

GLib.StringBuilder GLib.StringBuilder GLib.StringBuilder

Description:

[ Compact ]
[ GIR ( name = "String" ) ]
[ CCode ( cname = "GString" , cprefix = "g_string_" , free_function = "g_string_free" , type_id = "G_TYPE_GSTRING" ) ]
public class StringBuilder

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.


Namespace: GLib
Package: glib-2.0

Content:

Properties:

Static methods:

Creation methods:

Methods:

Fields: