StringG.freeToBytes

Transfers ownership of the contents of string to a newly allocated glib.Bytes The GString structure itself is deallocated, and it is therefore invalid to use string after invoking this function.

Note that while GString ensures that its buffer always has a trailing nul character (not reflected in its "len"), the returned glib.Bytes does not include this extra nul; i.e. it has length exactly equal to the "len" member.

class StringG
freeToBytes
()

Return Value

Type: Bytes

A newly allocated glib.Bytes containing contents of string; string itself is freed

Meta

Since

2.34