Array¶
Array
is an ordered list of values, of which the index is starting from zero.Properties¶
number Length¶
The Array length
1 2 |
|
Functions¶
Array Array.Create(string typeName, number length)¶
Returnsan array
Creates an instance of Array.
typeName
The element type of the array.length
The length of the array.
1 |
|
table ToTable()¶
ReturnsLua table.
Convert Array to Lua ordinary arrays.
1 2 3 4 5 6 7 8 9 10 11 |
|
void CopyTo(number startIndex, Array destination, number destinationStartIndex, number length)¶
Copy
length
elements of this array from startIndex
and writes to destination
from destinationStartIndex
.
startIndex
The start index of this array.destination
The array written to.destinationStartIndex
The start index of thedestination .length
The copied length.
1 2 3 4 5 |
|
void Reverse()¶
Reverses the array.
1 2 3 |
|
number IndexOf(table value)¶
ReturnsThe index.
Finds the first index of value
. Returns the index of the value
or -1 if value
not found.
value
The value.
number LastIndexOf(table value)¶
ReturnsThe index.
Finds the last index of value
. Returns the index of the value
or -1 if value
not found.
value
The value.