Lua standard library
Every app runs with the standard Lua library listed here, minus the globals
that read files or start programs: an app reaches files only through the
handles it is given. Each app also has require, which loads the modules of
its own package (Modules and dependencies).
The Lua sandbox explains what else differs
from plain Lua.
Functions
assert, collectgarbage, error, getmetatable, ipairs, load, next, pairs, pcall, print, rawequal, rawget, rawlen, rawset, select, setmetatable, tonumber, tostring, type, warn, xpcall.
Libraries
| Library | Members |
|---|---|
coroutine | close, continue, create, isyieldable, resume, running, status, wrap, yield, yieldto |
debug | traceback |
math | abs, acos, asin, atan, ceil, cos, deg, exp, floor, fmod, frexp, huge, ldexp, log, max, maxinteger, min, mininteger, modf, pi, rad, random, randomseed, sin, sqrt, tan, tointeger, type, ult |
string | byte, char, find, format, gmatch, gsub, len, lower, match, pack, packsize, rep, reverse, sub, unpack, upper |
table | concat, create, insert, move, pack, remove, sort, unpack |
utf8 | char, charpattern, codepoint, codes, len, offset |
Values
_G, _VERSION.
Left out
These standard globals are not there: dofile, io, loadstring, os.