string.listFind()

Determines the index of the first list element in which a specified value occurs. Case-sensitive

string.listFind( value [, delimiters [, includeEmptyFields ] ] )

Returns: Number

Argument Description
value
string, required

element for which to search

delimiters
string, optional

Characters that separate list elements. The default value is comma.

Alias: delimiter

includeEmptyFields
boolean, optional

if set to true, empty values are included as well

Examples

strList = "lucee,core,dev";
	writeoutput(strList.listfind("dev"));
	writeOutput("<br>");
	strListdeli = "adobe@coldfusion@lucee@";
	writeoutput(strListdeli.listfind("adobe","@"));

See also