To match whole values in the list, use ListFindNoCase().
ListContainsNoCase() finds substrings.

Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com


> -----Original Message-----
> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 10, 2002 12:41 PM
> To: CF-Talk
> Subject: Please clarify behaviour of listContainsNoCase
> 
> 
> Can someone confirm to me that this is the correct behaviour for
> listcontainsNoCase:
> 
> <cfscript>
>    if( listContainsNoCase("MRS,MS,MISS", "mr"  , "," )) {
>         gender = "F";
>    } else {
>       gender = "m";
>    }
> </cfscript>
> 
> <cfoutput>#gender#</cfoutput>
> 
> returns F, if I change the first entry in the list to MZ, M gets
> outputted.
> I'm assuming this is because MRS contains 'MR' however I thought the
> whole point of having a listcontainsNocase function (as 
> opposed to using
> contains() ) was that the function would look at each entry 
> as a whole?
> 
> Thanks
> 
> Kola
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to