Syntax
nthIndexOf('<text>', '<searchText>', <occurrence>)Examples
nthIndexOf('123456789123465789', '1', 2)9
nthIndexOf('123456789123465789', '6', 4)-1
Maker notes
- A negative occurrence counts from the end of the text.
Returns the position of the nth occurrence of a substring, or -1 if there are fewer.
nthIndexOf('<text>', '<searchText>', <occurrence>)nthIndexOf('123456789123465789', '1', 2)9
nthIndexOf('123456789123465789', '6', 4)-1