Example: Join a string-array to a single string

public static int main (string[] args) {
// Output: ``Dalek, Cyberman, Weeping Angel``
string[] enemy_list = {"Dalek", "Cyberman", "Weeping Angel"};
string enemies = string.joinv (", ", enemy_list);
print ("%s\n", enemies);
return 0;
}

 valac --pkg glib-2.0 string.joinv.vala

See:




2022 vala-language.org