VariantG.newString

Creates a string #GVariant with the contents of string.

string must be valid UTF-8, and must not be null. To encode potentially-null strings, use glib.variant.VariantG.new_ with ms as the [format string][gvariant-format-strings-maybe-types].

class VariantG
static
newString
(
string string_
)

Parameters

string_ string

a normal UTF-8 nul-terminated string

Return Value

Type: glib.variant.VariantG

a floating reference to a new string #GVariant instance