lastIndexOf


Description:

public static int lastIndexOf (string? s, string? substr)

Returns the index of the last occurrence of substr in s. Returns -1 if not found.

Example:

    assert (Strings.lastIndexOf ("hello hello", "hello") == 6);
assert (Strings.lastIndexOf ("hello", "xyz") == -1);

Parameters:

s

the string to search in.

substr

the substring to find.

Returns:

index of last occurrence, or -1 if not found.