Provides array utilities methods.
static public function contains(value, array:Array):Boolean
Indicates if array contains passed-in value.
value | Value to search |
array | Array where searching value.
|
true if passed-in value is in array.
static public function containsType(value, array:Array):Boolean
Indicates if array contains passed-in value instance type.
Don't use it to test primitive type as we compare full qualified class name.
value | Value to search |
array | Array where searching value.
|
true if passed-in value is in array.
static public function remove(value, array:Array):Boolean
Remove passed-in value value from passed-in array array
value | Value to remove |
array | Array where removing value.
|
true is passed-in value is removed
static public function removeAt(index:Number, array:Array):Array
Removes element at index position from passed-in
array array.
index | Index to remove |
array | Array instance
|
static public function getLastIndexOf(value, array:Array):Number
Returns index of the passed-in value element in
passed-in array.
Returns last index where element is found if many.
value | Value to search for |
array | Array instance
|
value position in array array (or -1)
static public function getIndexOf(value, array:Array):Number
Returns index of the passed-in value element in
passed-in array.
Returns first index where element is found if many.
value | Value to search for |
array | Array instance
|
value position in array array (or -1)
static public function areEqual(array1:Array, array2:Array):BooleanIndicates if the 2 passed arrays are equal or not.
array1 | First Array
|
true if 2 arrays are equals, otherwise false