get the size of the table||doc136026

September 20, 2022

Format

 Lib.getTableSize(tb) 
  • The class to which the function belongs:Lib

Description

Returns the number of contents in the table, or -1 if the parameter is not a table type.


Parameters

Variable name type Description
tb table target table


Value Returned

type Description
int amount of content


Code Samples

local t = {}  
local tableSize = Lib.getTableSize(t)