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.

luaL_checkinteger

luaL_checkinteger[-0, +0, v] lua_Integer luaL_checkinteger (lua_State *L, int arg); Checks whether the function argument arg is an integer (or can be converted to an integer) and returns this integer cast to a lua_Integer.

utf8.offset()

utf8.offset (s, n [, i])nsiniin#s + 1utf8.offset(s, -n)nnil As a special case, when n is 0 the function returns the start of the encoding of the character that contains the i-th byte of s. This function assumes that s is a valid UTF-8 string.

string.sub()

string.sub (s, i [, j])sijijjstring.sub(s,1,j)sjstring.sub(s, -i)isi If, after the translation of negative indices, i is less than 1, it is corrected to 1. If j is greater than the string length, it is corrected to that length. If, after these corrections, i is greater than j, the function returns the empty string.

lua_newtable

lua_newtable[-0, +1, m] void lua_newtable (lua_State *L); Creates a new empty table and pushes it onto the stack. It is equivalent to lua_createtable(L, 0, 0).

file:write()

file:write (···) Writes the value of each of its arguments to file. The arguments must be strings or numbers. In case of success, this function returns file. Otherwise it returns nil plus a string describing the error.

string.packsize()

string.packsize (fmt) Returns the size of a string resulting from string.pack with the given format. The format string cannot have the variable-length options 's' or 'z' (see §6.4.2).

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.read()

io.read (···) Equivalent to io.input():read(···).

luaL_prepbuffer

luaL_prepbuffer[-?, +?, m] char *luaL_prepbuffer (luaL_Buffer *B); Equivalent to luaL_prepbuffsize with the predefined size LUAL_BUFFERSIZE.