String to search through
Substring to search for
Optional
position: numberThe index at which to begin searching. If omitted, the search begins at the end
of the string. Default is undefined
Index of the last occurrence of searchString found, or -1 if not found.
This function mirrors the
lastIndexOf
function from the JavaScript Standard String object. It handles Unicode code points instead of UTF-16 character codes.Searches this string and returns the index of the last occurrence of the specified substring.