ListContains()
Determines the index of the first list element that contains a specified substring. Returns the index of the first list element that contains substring. If not found, returns zero.
ListContains( list=string, substring=string, delimiters=string, includeEmptyFields=boolean, multiCharacterDelimiter=boolean );
Returns: Number
Examples
writeOutput(listContains("I,love,lucee,testFile", "lucee"));//Expected output 3
//Member Function with @ delimiter
strList="I@am@lucee@dev";
writeDump(strList.listContains("dev","@"));//Expected output 4
See also
- Lists
- Strings
- string.listContains()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)