Table
Standard Luau table library. All functions are available in any Ionize script.
Available Functions
| Function | Description |
|---|---|
| table.clear | Clears all keys from the table, but leaves their capacity allocated so that future keys added to the table can re use that storage, avoiding additional allocations. |
| table.concat | Returns a string of all the values of array list separated by sep. |
| table.create | Creates an array like table with count values, initialized to value. When value is nil or omitted, the resulting table has length 0, but has preallocated storage for count elements. |
| table.find | Returns the numeric index of the first occurence of value, starting from init, or nil if value isn't present in the table. The default for init is 1. |
| table.foreach | Apply the function f to the elements of the table passed. |
| table.foreachi | Apply the function f to the elements of the table passed. This is similar to table.foreach() except that index value pairs are passed, not key value pairs. |
| table.getn | Returns the number of elements in the table passed. |
| table.insert | Inserts element value at position pos in list. |
| table.move | Moves elements from table a1 to table a2. |
| table.pack | Returns a new table with all arguments stored into keys 1, 2, etc. and with a field "n" with the total number of arguments. |
| table.remove | Removes from list the element at position pos, returning the value of the removed element. |
| table.sort | Sorts list elements in a given order, *in place*, from list[1] to list[#list]. |
| table.unpack | Returns all elements from an array as results. |