Skip to main content

Module table_lib

Module table_lib 

Source
Expand description

Rust port of ltablib.c — Lua table standard library.

Provides: table.concat, table.insert, table.move, table.pack, table.remove, table.sort, table.unpack.

C source: reference/lua-5.4.7/src/ltablib.c (430 lines, 14 functions)

Constants§

TABLE_FUNCS

Functions§

concat
insert
open_table
pack
Creates a new table t with all arguments as integer keys and t.n set to the argument count.
remove
sort
tmove
Copies elements a1[f..e] into a2[t..] (or a1[t..] if a2 is absent). Copies in increasing order when safe, decreasing when ranges overlap.
unpack
Pushes t[i], t[i+1], …, t[j] and returns the count.