lua_iscfunction

lua_iscfunction[-0, +0, –] int lua_iscfunction (lua_State *L, int index); Returns 1 if the value at the given index is a C function, and 0 otherwise.

collectgarbage()

collectgarbage ([opt [, arg]]) This function is a generic interface to the garbage collector. It performs different functions according to its first argument, opt: "collect": performs a full garbage-collection cycle. This is the default option. "stop": stops automatic execution of the garbage collector. The collector will run only when explicitly invoked, until a call to restart it. "restart": restarts automatic execution of the garbage collector. "count": returns the total memory

dofile()

dofile ([filename])dofilestdindofiledofile

lua_rawlen

lua_rawlen[-0, +0, –] size_t lua_rawlen (lua_State *L, int index); Returns the raw "length" of the value at the given index: for strings, this is the string length; for tables, this is the result of the length operator ('#') with no metamethods; for userdata, this is the size of the block of memory allocated for the userdata; for other values, it is 0.

string.match()

string.match (s, pattern [, init])matchpattern§6.4.1smatchnilpatterninit

tostring()

tostring (v)string.format If the metatable of v has a __tostring field, then tostring calls the corresponding value with v as argument, and uses the result of the call as its result.

math.type()

math.type (x) Returns "integer" if x is an integer, "float" if it is a float, or nil if x is not a number.

debug.setlocal()

debug.setlocal ([thread,] level, local, value) This function assigns the value value to the local variable with index local of the function at level level of the stack. The function returns nil if there is no local variable with the given index, and raises an error when called with a level out of range. (You can call getinfo to check whether the level is valid.) Otherwise, it returns the name of the local variable. See debug.getlocal for more information about variable indices and names.

io.input()

io.input ([file]) When called with a file name, it opens the named file (in text mode), and sets its handle as the default input file. When called with a file handle, it simply sets this file handle as the default input file. When called without parameters, it returns the current default input file. In case of errors this function raises the error, instead of returning an error code.

getmetatable()

getmetatable (object) If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a __metatable field, returns the associated value. Otherwise, returns the metatable of the given object.