Table Addon

From SolarStrike wiki
Revision as of 03:50, 18 February 2015 by Elverion (talk | contribs)
Jump to: navigation, search

copy

table table.copy(table tab)

Actually does a full copy of a table, instead of referencing the original. This also recursively copies sub-tables.


find

table table.find(table haystack, number|string needle)

Checks table 'haystack' for anything that matches 'needle'. If found, returns the table's key that contains the value. If no match is found, returns nil.


print

table.print(table tab[, number depth])

Recursively dump the table to the standard output. This is useful for debugging. When called from Lua, you probably shouldn't include the depth...