Table
Noir.Libraries.Table: NoirLibrary
A library containing helper methods relating to tables.
Noir.Libraries.Table:Length(tbl)
Returns the length of the provided table.
Parameters
tbl
: table
Returns
integer
Noir.Libraries.Table:Random(tbl)
Returns a random value in the provided table.
Parameters
tbl
: table
Returns
any
Noir.Libraries.Table:Keys(tbl)
Return the keys of the provided table.
Parameters
tbl
: table
Returns
tbl
Noir.Libraries.Table:Values(tbl)
Return the values of the provided table.
Parameters
tbl
: tbl
Returns
tbl
Noir.Libraries.Table:Slice(tbl, start, finish)
Get a portion of a table between two points.
Parameters
tbl
: tblstart
: number|nilfinish
: number|nil
Returns
tbl
Noir.Libraries.Table:ToString(tbl, indent)
Converts a table to a string by iterating deep through the table.
Parameters
tbl
: tableindent
: integer|nil
Returns
string
Noir.Libraries.Table:Copy(tbl)
Copy a table (shallow).
Parameters
tbl
: tbl
Returns
tbl
Noir.Libraries.Table:DeepCopy(tbl)
Copy a table (deep).
Parameters
tbl
: tbl
Returns
tbl
Noir.Libraries.Table:Merge(tbl, other)
Merge two tables together (unforced).
Parameters
tbl
: tableother
: table
Returns
table
Noir.Libraries.Table:ForceMerge(tbl, other)
Merge two tables together (forced).
Parameters
tbl
: tableother
: table
Returns
table
Noir.Libraries.Table:Find(tbl, value)
Find a value in a table. Returns the index, or nil if not found.
Parameters
tbl
: tablevalue
: any
Returns
any|nil
Noir.Libraries.Table:FindDeep(tbl, value)
Find a value in a table. Unlike :Find()
, this method will recursively search through nested tables to find the value.
Parameters
tbl
: tablevalue
: any
Returns
any|nil,
: table|nil
Last updated