string.listValueCount()

Counts instances of a specified value in a list. The search is case-sensitive.

string.listValueCount( value=string, delimiter=string, includeEmptyFields=boolean )

Returns: Number

Argument Description
value
string, required

Item for which to search

delimiter
string, optional

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

Alias: delimiters

includeEmptyFields
boolean, optional

if set to true, empty values are included as well

Examples

List = "lucee,ACF,luceeExt,lucee,lucee, ext,LUCEEEXT";
	writeDump(list.ListValueCount("lucee"));
	writeDump(ListValueCount(list, "luceeExt"));
	writeoutput("<br>");
	List2 = "lucee@ACF@luceeExt@lucee@ext@LUCEEEXT";
	writeDump(list2.ListValueCount("lucee", "@"));

See also