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.
typeNameThe element type of the array.lengthThe 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.
startIndexThe start index of this array.destinationThe array written to.destinationStartIndexThe start index of thedestination .lengthThe 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.
valueThe 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.
valueThe value.