Pete Freitag Pete Freitag

ColdFusion ListFind Example

Published on March 31, 2009
By Pete Freitag
coldfusion

The ListFind and ListFindNoCase functions are very handy in ColdFusion.

The ListFind function takes up to 3 arguments:

ListFind(list, value, [delimiter])

The default delimiter for all list functions in ColdFusion is a comma.

Here's a simple example of using ListFind:

ListFind("jpg,gif,png", "gif")

The above code would return 2. The ListFind function will return 0 if the value is not found in the list.



coldfusion functions listfind

ColdFusion ListFind Example was first published on March 31, 2009.

If you like reading about coldfusion, functions, or listfind then you might also like:

Fixinator

The Fixinator Code Security Scanner for ColdFusion & CFML is an easy to use security tool that every CF developer can use. It can also easily integrate into CI for automatic scanning on every commit.


Try Fixinator

CFBreak
The weekly newsletter for the CFML Community