Example: Find the rightmost occurrence of the given char

public static int main (string[] args) {
string filename = "blueprint-dalek.vs1.pdf";

// Output: ``19``
int index = filename.last_index_of_char ('.');
print ("%d\n", index);

// Output: ``-1``
index = filename.last_index_of_char ('Ω');
print ("%d\n", index);
return 0;
}

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

See: