File utils/tableutil.lua
Functions
tableutil.clone (table) | Performs a deep/recursive clone on the given table. |
tableutil.equals (a, b) | Tests the two given tables for equality. |
tableutil.keys (...) | Returns a (unique) list with all keys of all tables. |
tableutil.merge (...) | Merges the given tables into one instance. |
tableutil.to_string (table, indent) | Returns the string representation of the given table. |
Functions
- tableutil.clone (table)
-
Performs a deep/recursive clone on the given table.
Parameters
- table: The table to deep clone.
Return value:
The clone of the table. - tableutil.equals (a, b)
-
Tests the two given tables for equality.
Parameters
- a: The first table.
- b: The second table.
- tableutil.keys (...)
-
Returns a (unique) list with all keys of all tables.
Parameters
- ...: The list of tables.
Return value:
A list with all keys. - tableutil.merge (...)
-
Merges the given tables into one instance. Note that no cloning is performed so fields may refer to the same instances.
Parameters
- ...: The tables to merge.
Return value:
The merged table. - tableutil.to_string (table, indent)
-
Returns the string representation of the given table.
Parameters
- table: The table.
- indent: Optional. The number of spaces of indentation.
Return value:
The string representation of the given table.