class haxe.ds.ArraySortAvailable in flash8, flash, neko, js, php, cpp, cs, javaArraySort provides a stable implementation of merge sort through its sort() method. It should be used instead of Array.sort() in cases where the order of equal elements has to be retained on all targets. static function sort<T>( a : Array<T>, cmp : T -> T -> Int ) : VoidSorts Array a according to the comparison function cmp, where cmp(x,y) returns 0 if x == y, a positive Int if x > y and a negative Int if x < y.
This operation modifies Array a in place.
This operation is stable: The order of equal elements is preserved.
If a or cmp are null, the result is unspecified.
version #16213, modified 2013-02-24 23:50:04 by api
0 comment