lastIndexOf: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Added version.) |
m (Conversion script moved page lastIndexOf to LastIndexOf without leaving a redirect: Converting page title to first-letter uppercase) |
(No difference)
|
Revision as of 22:18, 9 February 2023
lastIndexOf() Function
• Introduced in version 1.3b48
Finds the index in a string of the last occurrence of a substring in a string. If the substring does not occur in the string then -1 is returned. The index for the string starts at 0.
Usage
lastIndexOf(str, substr)
Example
[lastIndexOf("abcde", "c")]
Returns 2
[lastIndexOf("abcde", "z")]