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);
| s |
the string to search in. |
| substr |
the substring to find. |
|
index of last occurrence, or -1 if not found. |