Garry's Mod Wiki

Garry's Mod Wiki

  boolean table.IsEmpty( table tab )

Description

Returns whether or not the given table is empty.

This works on both sequential and non-sequential tables, and is a lot faster for non-sequential tables than table.Count(tbl) == 0.
If you want to check if a table is not empty, use next(tbl) ~= nil, as it is slightly faster.

For sequential tables it is better to use tab[1] ~= nil.

Arguments

1 table tab
Table to check.

Returns

1 boolean
Is empty?

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...