SFramework expands upon some of the built-in LUA table library functionality. Here, you can find reference for these additions.
Returns the index of the given value in the given table, or 0
if not found
t
- table
(required) the table to search inval
- any
(required) the value to check for
local myTable = {2, 5, 4, 7, 1}
local index = table.indexOf(myTable, 4) --should return 3
Returns the length of the given table. This will work for both arrays and keyed tables
t
- table
(required) the table to get the length of
```lua local myArrayTable = {2, 5, 4, 7, 1} local arrayLength = table.length(myArrayTable) –should return 5
local myKeyedTable = {x = 1, y = 2} local tableLength = table.length(myKeyedTable) –should return 2 ```