Table API
|
|||||||||||
Turn table into a string, provided that all of its elements can be coerced into a string. If a separator is specified, then it is inserted between each element. Additionally, concatenation starts at the ith element and ends at the jth. | |||||||||||
Syntax | table.concat(
|
||||||||||
Returns | string | ||||||||||
Part of | Lua (source) | ||||||||||
API | table | ||||||||||
| |||||||||||
|
|
|||||||||||
This function is deprecated.[1]
Calls func once for each key-value pair in the tbl. Specifically, <nowiki>
table.foreach(tbl, func)
</nowiki>
is equivalent to <nowiki>
for key, value in pairs(tbl) do
if func(key, value) ~= nil then
break
end
end
</nowiki>
|
|||||||||||
Syntax | table.foreach(
|
||||||||||
Returns | nil | ||||||||||
Part of | Lua (source) | ||||||||||
API | table | ||||||||||
|
References
- "lua-users wiki: Table Library Tutorial". Retrieved 2018-08-13.
Table.foreachi
|
|||||||||||
Adds item to the table, at the specified position, or at the end if position is not specified. | |||||||||||
Syntax | table.insert(
|
||||||||||
Returns | nil | ||||||||||
Part of | Lua (source) | ||||||||||
API | table | ||||||||||
| |||||||||||
|
Table.pack Table.remove
|
|||||||||||
Sort the array, using the function sorter to compare the elements, or < if it is not given, in place. If no sorter is specified, the array must consist entirely of comparable values (either numbers or strings, but not both). |
|||||||||||
Syntax | table.sort(
|
||||||||||
Returns | nil | ||||||||||
Part of | Lua (source) | ||||||||||
API | table | ||||||||||
| |||||||||||
| |||||||||||
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.