A GString is an object that handles the memory management of a C string for you. 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 g_strdup() on it.