Variant.bytestring_array


Description:

[ Version ( since = "2.26" ) ]
public Variant.bytestring_array (string[] value)

Constructs an array of bytestring Variant from the given array of strings.

If length is -1 then strv is null-terminated.

Example: Create a new byte string[] Variant:

public static int main () {
Variant var1 = new Variant.bytestring_array ({"a", "b", "c"});

// Output: ``a, b, c``
print ("%s\n", string.joinv (",", var1.dup_bytestring_array ()));
// Output: ``a, b, c``
print ("%s\n", string.joinv (",", var1.get_bytestring_array ()));

return 0;
}

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

Parameters:

length

the length of strv, or -1

strv

an array of strings

Returns:

a new floating Variant instance