ListValueCount()
Counts instances of a specified value in a list.
The search is case-sensitive.
ListValueCount( list=string, value=string, delimiter=string, includeEmptyFields=boolean );
Returns: Number
Examples
List = "lucee,ACF,luceeExt,lucee, ext,LUCEEEXT";
writeDump(ListValueCount(list, "lucee")); // It return's 2
writeDump(ListValueCount(list, "luceeExt")); // It return's 1 because it case sensitive
List2 = "lucee@ACF@luceeExt@lucee@ext@LUCEEEXT";
writeDump(ListValueCount(list2, "lucee", "@"));
See also
- Lists
- Strings
- string.listValueCount()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)