Kola, "listcontains( )" and Listcontainsnocase( ) finds occurances of the substring within the list - It does not match against values in the list. So for example, if you are looking for "MR" in a list of "MRS,MS,MISS" - it will return true - because MR is a part of MRS. If you use "listfindnocase" it examines the elements of the list against the string - Listfindnocase("MRS,MS,MISS","MR") would return false, because no "element" of the list matches (even though a substring does).
-mk -----Original Message----- From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 11:41 AM 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