String.newTake

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.

class String
static
newTake
(
string init_ = null
)

Parameters

init_ string

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

Return Value

Type: glib.string_.String

the new #GString