Whats the difference between listContains()
and listFind()
/ listFindNoCase()
?
They are all list functions, take the same parameters, and return the same result.
listContains
looks for the value anywhere in a string, so for example
<cfset list = '1,2,33,4,5' />
<cfdump var="#listContains(list,3)#">
Would return 3 because a 3 is found in the 3rd list item.
listFind
looks for the value AS one of the list items.
<cfdump var="#listFind(list,3)#">
Returns 0 because 3 is not one of the list items.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With