aboutsummaryrefslogtreecommitdiff
path: root/modules/lua/api/table.luadoc
blob: 81f5a3694492a4c924091032f6b2170b395dc84a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- Returns concatenated table elements i to j separated by sep.
function concat(table [, sep [, i [, j]]])
---
-- Executes f(index,value) over all elements of table, returns first non-nil of
-- f.
function foreach(table, f)
---
-- Executes f(index,value) in sequential order 1 to n, returns first non-nil of
-- f.
function foreachi(table, f)
---
-- Returns size of table, or n field, or table.setn value, or 1 less first index
-- with nil value.
function getn(table)
--- Insert value at location pos in table, default pos=n+1.
function insert(table, [pos,] value)
--- Removes element at pos from table, default pos=n.
function remove(table [, pos])
--- Sets size of table, n field of table if it exists.
function setn(table, n)
--- Sorts in-place elements 1 to n, comp(v1,v2) true if v1<v2, default <.
function sort(table [, comp])