Example: Reverse a string

public static int main (string[] args) {
// Output: ``I ain't afraid of no dalek!``
string my_secret = "!kelad on fo diarfa t'nia I".reverse ();
print ("%s\n", my_secret);
return 0;
}

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

See:




2022 vala-language.org