string.find()
Finds the first occurrence of a substring in a string, from a specified start position.
The search is case-sensitive.
string.find( substring=string, start=number )
Returns: Number
| Argument | Description |
|---|---|
|
substring
string,
required
|
edit
String for which to search. |
|
start
number,
optional
|
edit
Start position of search. |
Examples
edit str="I love lucee";
writeOutput(str.find('lucee'));//8
writeOutput("<br>");
strStart="Lucee COre Developer";
writeOutput(strStart.find('o',3));//17