rstr_len
Description:
[ CCode ( cname = "g_strrstr_len" ) ]
public unowned string? rstr_len (ssize_t haystack_len, string needle)
public unowned string? rstr_len (ssize_t haystack_len, string needle)
Example: Search for the last occurrence of a substring:
public static int main (string[] args) {
string str = "This is hardly rocket science, this is quantum physics!";
unowned string? pos = str.rstr_len (str.length, "science");
// Output: ``science, this is quantum physics!``
print ("%s\n", pos);
return 0;
}
valac --pkg glib-2.0 string.rstr_len.vala