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 UTF-8 encoded, will never be null, and will never contain nul bytes.
If length is non-null then the length of the string (in bytes) is returned there. For
trusted values, this information is already known. Untrusted values will be validated and, if valid, a
size will be performed. If invalid, a default value will be returned — for
g_variant_type_object_path, this is `"/"`, and for other types it is the empty string.
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, UTF-8 encoded |