Hello Flashcoders,
Sometimes I'd like to use advanced array functions like those in,
say, PHP: in_array (check array for having a value),
array_unique (delete duplicates) etc.
For now, I use my own ones. Example:
function my_in_array(needle:String, haystack:Array):Boolean{
if(haystack.toString().indexOf(needle) == -1){
return true;
}else{
return false;
}
}
Frankly, I'm not sure if this is the best/fastest way for such
tasks: "needle" needs to be a string type.
Does anyone have info or ideas on this?
--
Best regards,
GregoryN
================================
http://GOusable.com
Flash components development.
Usability services.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders