Table

MSK.Table.Contains

Check if a value contains in a table

Parameters tbl - table - The Table to check value - string/table - The Value/s to check

Returns contains - boolean - Whether the value contains in the table

local tbl = {'value_1', 'value_2'}

-- Checks if the value contains in the table
local contains = MSK.Table.Contains(tbl, 'value_1')

-- Checks if one of the values contains in the table
local contains = MSK.Table.Contains(tbl, {'value_1', 'value_5'})

-- As an Export:
local contains = exports.msk_core:TableConatins(tbl, value)

MSK.Table.Dump

Dumps the given table to a readable string with a tree structure.

Parameters tbl - table - The Table that should be dumped

Returns text - string - The formatted text of the given table

MSK.Table.Size

Get the size of the table

Parameters tbl - table - The Table that should be checked

Returns size - number - The size of the table

MSK.Table.Find

Find a specific value in a index table

Parameters tbl - table - The Table that should be checked

Returns index - number? - The index of the given value value - number/string/table - The value of the given value

Last updated