Coldfusion: listContains and listFind

What is the difference between listContains()and listFind()/ listFindNoCase()?

These are all functions of the list, take the same parameters and return the same result.

+5
source share
1 answer

listContains searches for a value anywhere in the string, e.g.

<cfset list = '1,2,33,4,5' />
<cfdump var="#listContains(list,3)#"> 

Will return 3 because 3 is found in the 3rd list item.

listFind Searches for the value of AS as one of the list items.

<cfdump var="#listFind(list,3)#"> 

Returns 0 because 3 is not one of the elements in the list.

+27
source

All Articles