FindLastNoCase()
Finds the last occurrence of a substring in a string, from a specified start position. If substring is not in string, returns zero. The search is case-insensitive.
Introduced: 5.3.5.22
FindLastNoCase( substring=string, string=string, start=number );
Returns: Number
Argument | Description | Default |
---|---|---|
substring
string,
required
|
String for which to search. |
|
string
string,
required
|
String in which to search. |
|
start
number,
optional
|
End position of search from the left. |
1 |
Examples
sentences="Swansea Jack was a black retriever with a longish coat. He lived in the North Dock / River Tawe area of Swansea, what gave him the name of Swansea Jack. Swansea Jack's first rescue, in June 1931, when he saved a 12-year-old boy, went unreported.";
dump( right( sentences, len( sentences )- sentences.findlastnocase( "SwAnSeA JACK" ) + 1 ) );
See also
- Strings
- string.findLastNoCase()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)