next
Example
Returns whether the table is empty or not
local function IsEmptyTable( t )
return next( t ) == nil
end
local mytable = {}
print( "mytable is empty:", IsEmptyTable( mytable ) )
mytable["hello"]=true
print( "mytable is empty:", IsEmptyTable( mytable ) )
Output:
mytable is empty: true
mytable is empty: false