Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make ListFind() to consider a string having a comma in it as a complete single string

Tags:

coldfusion

I got a problem in using listfind().

I have a list of strings.One of my string has a comma.

Now when I use listfind() to compare with another string I don't get the output expected. i.e The string with a comma in it is not detected.

How can the listfind() to work even for the string having comma in it ?

like image 758
Somu Avatar asked Jan 22 '23 02:01

Somu


1 Answers

The default delimiter for all CF functions is the comma. In order to use strings with commas you must change the delimiter.

For example:

ListAppend(list, "A value, with comma", "^")
ListFind(list, "A value, with comma", "^")
like image 116
Jeff Price Avatar answered May 29 '23 16:05

Jeff Price