目录#

类型与方法. 其他参数和结果类型指指定X4层;未知的合同是明确的.

Lua 全球化#

呼叫/事件 返回
assert any, ...
collectgarbage number | boolean
dofile any, ...
error never
getmetatable table | any | nil
ipairs function, table, number
next (any, any) | nil
pairs function, table, nil
pcall boolean, any, ...
rawget any | nil
rawset table
require any
select number | any, ...
setmetatable table
tonumber number | nil
tostring string
type string
unpack any, ...
xpcall boolean, any, ...

调试#

呼叫/事件 返回
debug.getupvalue (string, any) | nil
debug.setupvalue string | nil

其他#

呼叫/事件 返回
ffi.cast cdata
ffi.cdef none
ffi.copy none
ffi.new cdata
ffi.sizeof number | nil
ffi.string string

数学#

呼叫/事件 返回
math.abs number
math.asin number
math.atan2 number
math.ceil number
math.cos number
math.deg number
math.floor number
math.max number
math.min number
math.rad number
math.random number
math.sin number
math.sqrt number

包装#

呼叫/事件 返回
package.loadlib function | (nil, string, string)

string#

呼叫/事件 返回
string.byte number, ...
string.char string
string.find (number, number, ...) | nil
string.format string
string.gmatch function
string.lower string
string.rep string
string.upper string

table#

呼叫/事件 返回
table.concat string
table.insert none
table.remove any | nil
table.sort none
table.unpack any, ...