Creates a new #GString, initialized with the given string.
Adds a string onto the end of a #GString, expanding it if necessary.
Adds a byte onto the end of a #GString, expanding it if necessary.
Appends len bytes of val to string.
Converts a Unicode character into UTF-8, and appends it to the string.
Appends unescaped to string, escaping any characters that are reserved in URIs using URI-style escape sequences.
Converts all uppercase ASCII letters to lowercase ASCII letters.
Converts all lowercase ASCII letters to uppercase ASCII letters.
Copies the bytes from a string into a #GString, destroying any previous contents. It is rather like the standard strcpy() function, except that you do not have to worry about having enough space to copy the string.
Converts a #GString to lowercase.
Compares two strings for equality, returning true if they are equal. For use with #GHashTable.
Removes len bytes from a #GString, starting at position pos. The rest of the #GString is shifted down to fill the gap.
Frees the memory allocated for the #GString.
Transfers ownership of the contents of string to a newly allocated #GBytes. The #GString structure itself is deallocated, and it is therefore invalid to use string after invoking this function.
Creates a hash code for str; for use with #GHashTable.
Inserts a copy of a string into a #GString, expanding it if necessary.
Inserts a byte into a #GString, expanding it if necessary.
Inserts len bytes of val into string at pos.
Converts a Unicode character into UTF-8, and insert it into the string at the given position.
Overwrites part of a string, lengthening it if necessary.
Overwrites part of a string, lengthening it if necessary. This function will work with embedded nuls.
Adds a string on to the start of a #GString, expanding it if necessary.
Adds a byte onto the start of a #GString, expanding it if necessary.
Prepends len bytes of val to string.
Converts a Unicode character into UTF-8, and prepends it to the string.
Replaces the string find with the string replace in a #GString up to limit times. If the number of instances of find in the #GString is less than limit, all instances are replaced. If limit is 0, all instances of find are replaced.
Sets the length of a #GString. If the length is less than the current length, the string will be truncated. If the length is greater than the current length, the contents of the newly added area are undefined. (However, as always, string->str[string->len] will be a nul byte.)
Cuts off the end of the GString, leaving the first len bytes.
Converts a #GString to uppercase.
Creates a new #GString with len bytes of the init buffer. Because a length is provided, init need not be nul-terminated, and can contain embedded nul bytes.
Creates a new #GString, initialized with the given string.
Creates a new #GString, with enough space for dfl_size bytes. This is useful if you are going to add a lot of text to the string and don't want it to be reallocated too often.
Pointer to the C boxed value
Get the GType of this boxed type.
Boxed GType property.
Convenience method to return this cast to a type. For use in D with statements.
Make a copy of the wrapped C boxed data.
Copy a C boxed value using g_boxed_copy.
Free a C boxed value using g_boxed_free.
A glib.string_.String is an object that handles the memory management of a C string.
The emphasis of glib.string_.String is on text, typically UTF-8. Crucially, the "str" member of a glib.string_.String 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 glib.string_.String can also hold arbitrary binary data, because it has a "len" member, which includes any possible embedded nul characters in the data. Conceptually then, glib.string_.String is like a glib.byte_array.ByteArray with the addition of many convenience methods for text, and a guaranteed nul terminator.