>@Dominic.. Short and sweet.. Exactly what I was lookign for.. although I'm not 
>sure yet if it breaks out as early as I would like.. but I haven't explorer 
>the UDF code yet. Either way, the correct results and short code is perfect! 
>Appreciate it.

Yeh, it's clearly not the most efficient for large lists (though large
lists just aren't efficient). After some testing, the following method
seemed just about the most efficient in terms of proccesing time:

<cffunction name="ListContainsAny" returntype="boolean">
     <cfargument name="list1" required="true" type="string">
     <cfargument name="list2" required="true" type="string">
     <cfargument name="delim1" required="false" default="," type="string">
     <cfargument name="delim2" required="false" default="," type="string">
        
     <cfset var item = "">
     <cfloop list="#arguments.list1#" index="item"
delimiters="#arguments.delim1#">
          <cfif ListFind(list2, item)><cfreturn true></cfif>
     </cfloop>
     <cfreturn false>   
</cffunction>

Pretty obvious really. You'd probably want a NoCase version too.

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305891
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to