String.newTake

glib.string_.String newTake(string init_ = null)

Creates a new #GString, initialized with the given string.

After this call, init belongs to the #GString and may no longer be modified by the caller. The memory of data has to be dynamically allocated and will eventually be freed with glib.global.gfree.

Parameters

init_initial text used as the string. Ownership of the string is transferred to the #GString. Passing null creates an empty string.

Returns

the new #GString