.. _lua-functions: ################### Lua Functions ################### Lua Standard Libraries The standard Lua libraries provide useful functions that are implemented directly through the C-API. Some of these functions provide essential services to the language (e.g., :ref:`lua-func-type` and :ref:`lua-func-getmetatable`); others provide access to "outside" services (e.g., I/O); and others could be implemented in Lua itself, but are quite useful or have critical performance requirements that deserve an implementation in C (e.g., :ref:`lua-func-table.sort`). All libraries are implemented through the official C API and are provided as separate C modules. Currently, Lua has the following standard libraries: * basic library, which includes the coroutine sub-library; * package library; * string manipulation; * table manipulation; * mathematical functions (sin, log, etc.); * input and output; * operating system facilities; * debug facilities. Except for the basic and package libraries, each library provides all its functions as fields of a global table or as methods of its objects. .. toctree:: :maxdepth: 1 base.txt coroutine.txt debug.txt io.txt math.txt os.txt package.txt string.txt table.txt Extensions .. toctree:: :maxdepth: 1 inspect.txt jit.txt lua-utf8.txt lxr.txt struct.txt :sub:`id-1780446`