Example: Utf8-handling, get_prev_char

public static int main (string[] args) {
string wisdom = "一石二鳥";
int index = wisdom.length;
unichar c;

// Output: ``鳥二石一``
while (wisdom.get_prev_char (ref index, out c)) {
print (c.to_string ());
}
print ("\n");

return 0;
}

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

See: