> Try this (just wrote it). It uses the removeAll method of the array
> object and is very little code:
It actually could be slimmer than that because the removeAll method
returns true if the array is changed after operation. Here it is again
but with delimiter option support (and slimmer):
<cfscript>
function ListContainsAny(list1, list2){
var delim1 = iif(ArrayLen(arguments) GTE 3,
DE(arguments[3]), DE(','));
var delim2 = iif(ArrayLen(arguments) GTE 4,
DE(arguments[4]), DE(','));
var aOne = ListToArray(arguments.list1, delim1);
var aTwo = ListToArray(arguments.list2, delim2);
return aOne.removeAll(aTwo);
}
</cfscript>
--
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:305887
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4