File builtin/stdlib.lua

Functions

addAll (tbl, values) Adds all key/value pairs in values to tbl.
destroyValues (tbl) Calls the destroy method on all values of table tbl.
extend (...) Takes a list of tables and generates a new table containing SHALLOW copies of all attributes.
getDeepField (t, name) Returns a 'deep' field from table t.
getLocalVars (level, max) Returns the value of the local (or upval) variable at the specified level
getScriptPos (callOffset) Returns the script file and line.
getTableOrVarArg (...) Converts a table or vararg argument and returns it as a table.
join (...) Blocks until all threads passed as an argument are finished.
removeAll (tbl, val) Removes all key/value pairs from tbl for which value == val.
shallowCopy (x) Creates a shallow copy of x
signum (x) Returns the sign of the given number (-1 for negative values, 1 for positive, and 0 for zero).
split (str, pattern) Splits str based on the regular expression pattern.
trim (str) Trims the whitespace from the edges of the given string.
update1join (...) Calls the update method on each argument, then calls join.
values (...) Return a new table returning all non-nil values of tbl inserted with sequential numerical indices.
yieldClosure (...) Returns a Lua closure wrapping the Java implementation of the yield function.


Functions

addAll (tbl, values)
Adds all key/value pairs in values to tbl.

Parameters:

  • tbl:
  • values:
destroyValues (tbl)
Calls the destroy method on all values of table tbl.

Parameters:

  • tbl:
extend (...)
Takes a list of tables and generates a new table containing SHALLOW copies of all attributes.

Parameters:

  • ...:
getDeepField (t, name)
Returns a 'deep' field from table t. The given name will be split into '.'-separated chunks which are used to recursively traverses tables to find the matching value.

Parameters:

  • t:
  • name:
getLocalVars (level, max)
Returns the value of the local (or upval) variable at the specified level

Parameters:

  • level: The depth in the callstack to get the locals from (1=current function)
  • max:
getScriptPos (callOffset)
Returns the script file and line.

Parameters:

  • callOffset: Offset in the call stack to determine the script file and line of.
getTableOrVarArg (...)
Converts a table or vararg argument and returns it as a table.

Parameters:

  • ...:
join (...)
Blocks until all threads passed as an argument are finished.

Parameters:

  • ...:
removeAll (tbl, val)
Removes all key/value pairs from tbl for which value == val.

Parameters:

  • tbl:
  • val:
shallowCopy (x)
Creates a shallow copy of x

Parameters:

  • x:
signum (x)
Returns the sign of the given number (-1 for negative values, 1 for positive, and 0 for zero).

Parameters:

  • x:
split (str, pattern)
Splits str based on the regular expression pattern.

Parameters:

  • str:
  • pattern:
trim (str)
Trims the whitespace from the edges of the given string.

Parameters:

  • str:
update1join (...)
Calls the update method on each argument, then calls join.

Parameters:

  • ...:

See also:

values (...)
Return a new table returning all non-nil values of tbl inserted with sequential numerical indices.

Parameters:

  • ...:
yieldClosure (...)
Returns a Lua closure wrapping the Java implementation of the yield function.

Parameters:

  • ...:

Valid XHTML 1.0!