English English Spanish EspañolKorea한국어
Straker»Company»Blog»2005» Another new function: listDiff()

Another new function: listDiff()

It's in shadomx.util.misc.list

This is the hint:

Returns a list that is all the items from

list1 that are not in list2. Uses

java.util.HashSet.

Sample usage:

<cfscript>
oList = createObject("component", "shadomx.util.misc.list");
lStrakerDevelopers="adam,rhys,indy,glenn,wazza,vlad,miri,leigh,dave,mat,grant";
lShadoDevelopers="grant,glenn,adam,indy,rhys,wazza,vlad";
lServicesTeam =
oList.listDiff(lStrakerDevelopers, lShadoDevelopers);
</cfscript>
<cfdump var="#lServicesTeam#">

 

Very handy.

AC


Comments

There are no comments for this page as yet.

Add a comment