Prev | Current Page 107 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


remove( x : T ) : Bool Removes the first occurrence of a given item and
returns a boolean success value.
reverse() : Void Returns a copy of the Array with the items reversed.
shift() : Null < T > Removes the first item of the Array and returns it.
slice( pos : Int, ?end : Int ) :
Array < T >
Copies a specified range of items in an Array and
returns it as a new Array.
sort( f : T - > T - > Int ) : Void Sorts the Array according to a given comparison function
where zero is returned if x == y, greater than zero
if x > y and less than zero if x < y.
splice( pos : Int, len : Int ) :
Array < T >
Removes a given range of items from an Array and
returns them as a new Array.
toString() : String Returns a string representation of the Array.
unshift( x : T ) : Void Adds a given item to the start of the Array.
The T type in Table 3 - 3 is not a type in itself, but a placeholder, and represents a type value decided at
run time, which enables strict typing, while remaining anonymous for any type you want to pass to the
function.


Pages:
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119