Posted By

jaredyeo on 11/07/10


Tagged

array difference


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

sexyflash
tspitzr
prjohnny
albertomori


AS3 Array Difference


 / Published in: ActionScript 3
 

URL: http://simplistika.com

vLarger - Larger array vSmaller - Smaller array

  1. function fDifference(vLarger : Array, vSmaller : Array) : Array
  2. {
  3. var i : int;
  4. var vList : Array = new Array();
  5.  
  6. for (i = 0; i < vLarger.length; i++)
  7. if (vSmaller.indexOf(vLarger[i]) == -1)
  8. vList.push(vLarger[i])
  9. return vList;
  10. }

Report this snippet  

You need to login to post a comment.