last Index Of
Returns the index within this string of the rightmost occurrence of the specified substring. The rightmost empty string "" is considered to occur at the index value this.length()
. The returned index is the largest value k such that
this.toString().startsWith(str, k)
Return
if the string argument occurs one or more times as a substring within this object, then the index of the first character of the last such substring is returned. If it does not occur as a substring, -1
is returned.
Parameters
the substring to search for.
Returns the index within this string of the last occurrence of the specified substring. The integer returned is the largest value k such that:
k <= Math.min(fromIndex, this.length()) &&
this.toString().startsWith(str, k)
Return
the index within this sequence of the last occurrence of the specified substring.
Parameters
the substring to search for.
the index to start the search from.