Example: Get a byte string

public static int main (string[] args) {
Variant var1 = new Variant.bytestring ("Hello, world!");

// Output: ``'Hello, world!'``
print ("'%s'\n", var1.get_bytestring ());

return 0;
}

 valac --pkg glib-2.0 GLib.Variant.get_bytestring.vala

See:




2022 vala-language.org