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

String for which to search.

start
number, optional

Start position of search.

Examples

str="I love lucee";
	writeOutput(str.find('lucee'));//8
	writeOutput("<br>");
	strStart="Lucee COre Developer";
	writeOutput(strStart.find('o',3));//17

See also