Returns the string value of a Variant instance with a string type.
This includes the types g_variant_type_string, g_variant_type_object_path and g_variant_type_signature.
The string will always be utf8 encoded.
If length
is non-null then the length of the string (in bytes) is returned
there. For trusted values, this information is already known. For untrusted values, a size
will be performed.
It is an error to call this function with a this of any type other than those three.
The return value remains valid as long as this exists.
this |
a string Variant instance |
length |
a pointer to a size_t, to store the length |
the constant string, utf8 encoded |