From WikiChip
Editing Lua Standard Libraries

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 3: Line 3:
 
== Basic Library ==
 
== Basic Library ==
 
{{main|Basic Library - Lua}}
 
{{main|Basic Library - Lua}}
 
 
The Basic Library is composed of a set of core functions for the Lua language.
 
The Basic Library is composed of a set of core functions for the Lua language.
  
 
=== coroutine Library ===
 
=== coroutine Library ===
 
{{main|Coroutine Library - Lua}}
 
{{main|Coroutine Library - Lua}}
 
 
The Coroutine Library is a sub-library of the Basic Library that provides a set of functions for manipulating coroutines. All coroutines functions are exported inside the table ''coroutine''.
 
The Coroutine Library is a sub-library of the Basic Library that provides a set of functions for manipulating coroutines. All coroutines functions are exported inside the table ''coroutine''.
  
 
== Package Library ==
 
== Package Library ==
 
{{main|Package Library - Lua}}
 
{{main|Package Library - Lua}}
 
 
The Package Library provides the facilities for loading and building modules. With the exception of [[require - Lua|require]] and [[module - Lua|module]], all package library functions are in the table ''package''.
 
The Package Library provides the facilities for loading and building modules. With the exception of [[require - Lua|require]] and [[module - Lua|module]], all package library functions are in the table ''package''.
  
 
== Mathematical Library ==
 
== Mathematical Library ==
 
{{main|Mathematical Library - Lua}}
 
{{main|Mathematical Library - Lua}}
 
 
The Mathematical Library provides a set of common mathematical functions such as trigonometric functions, exponentiation and logarithms, rounding functions, and various other math auxiliary functions such as maximum, minimum and pseudo-random generators. All mathematical functions resides inside the table ''math''.
 
The Mathematical Library provides a set of common mathematical functions such as trigonometric functions, exponentiation and logarithms, rounding functions, and various other math auxiliary functions such as maximum, minimum and pseudo-random generators. All mathematical functions resides inside the table ''math''.
  
 
== String Library ==
 
== String Library ==
 
{{main|String Library - Lua}}
 
{{main|String Library - Lua}}
 
 
The String Library provides a set of functions for manipulating strings, searching and extracting substrings, as well as pattern matching. String indexes are 1-based. Negative indices are interpreted as indexing backwards, from the end of the string. All string manipulating functions reside inside the table ''string''. The string library assumes the strings are encoded using a one-byte encoding schemes.
 
The String Library provides a set of functions for manipulating strings, searching and extracting substrings, as well as pattern matching. String indexes are 1-based. Negative indices are interpreted as indexing backwards, from the end of the string. All string manipulating functions reside inside the table ''string''. The string library assumes the strings are encoded using a one-byte encoding schemes.
  
 
== Table Library ==
 
== Table Library ==
 
{{main|Table Library - Lua}}
 
{{main|Table Library - Lua}}
 
 
The Table Library provides generic functions for manipulating tables. Most of the functions assume that the table represents a list or an array. All table manipulation functions are inside the table ''table''.
 
The Table Library provides generic functions for manipulating tables. Most of the functions assume that the table represents a list or an array. All table manipulation functions are inside the table ''table''.
  
 
== I/O Library ==
 
== I/O Library ==
 
{{main|I/O Library - Lua}}
 
{{main|I/O Library - Lua}}
 
 
The I/O Library provides a set of file manipulation functions in two styles: using implicit file descriptors and using explicit file descriptors. Table ''io'' also provides three predefined file descriptors: io.stdin, io.stdout, and io.stderr as the standard input, out and error streams.
 
The I/O Library provides a set of file manipulation functions in two styles: using implicit file descriptors and using explicit file descriptors. Table ''io'' also provides three predefined file descriptors: io.stdin, io.stdout, and io.stderr as the standard input, out and error streams.
  
 
== OS Library ==
 
== OS Library ==
 
{{main|OS Library - Lua}}
 
{{main|OS Library - Lua}}
 
 
The OS Library provides a set of miscellaneous functions for various OS services such as time and date manipulation, temporary file, environment variable, and file renaming and removing.
 
The OS Library provides a set of miscellaneous functions for various OS services such as time and date manipulation, temporary file, environment variable, and file renaming and removing.
  
 
== Debug Library ==
 
== Debug Library ==
 
{{main|Debug Library - Lua}}
 
{{main|Debug Library - Lua}}
 
 
The Debug Library provides facilities for debugging and profiling Lua programs. All debug functions are provided inside the ''debug'' table.
 
The Debug Library provides facilities for debugging and profiling Lua programs. All debug functions are provided inside the ''debug'' table.
  

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)

Template used on this page: