Yes I agree with that, and my response would be that the list element is
seperated by the delimiter hence returning the wrong value! And the
documentation even clearly states, "String being sought in elements of
list." And in this example 10 is an element where as 1 is not an element in
this example....
regards
Andrew Scott
Senior Cold Fusion Application Developer
-----Original Message-----
From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
Sent: 04 December 2000 12:06
To: CF-Talk
Subject: RE: ListContains wierdness - why?
No, this isn't a bug.
According to the documentation, ListContains returns the index of the first
list element THAT CONTAINS THE SPECIFIED SUBSTRING.
Your code returns true because the substring "1" is contained in the list
element "10".
So it doesn't really do what you were thinking.
Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork
-----Original Message-----
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 04, 2000 11:24 AM
To: CF-Talk
Subject: RE: ListContains wierdness - why?
Hmmm, I think you found a bug!
regards
Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693
* [EMAIL PROTECTED]
-----Original Message-----
From: Park, Simon [mailto:[EMAIL PROTECTED]]
Sent: 01 December 2000 06:47
To: CF-Talk
Subject: ListContains wierdness - why?
Why does the following always return TRUE?
<CFSET FooList = "6,7,8,9,10">
<CFIF ListContains(VARIABLES.FooList, "1")>
TRUE
<CFELSE>
FALSE
</CFIF>
Do I need to put the values into an array?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Simon Park Computer Systems Management, Inc.
Ph: 703-823-4300 x119 205 South Whiting Street #201
fax: 703-823-4301 Alexandria, VA 22304
http://www.csmi.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists