FANDOM


rawlen( tbl )

Get the length of a table, bypassing metamethods

tbl
The table whose length to retrieve.

When creating things like custom containers, one often overrides the __len metamethod with custom code, but might then need to check the true length of the underlying table without going through that override. This can be done with rawlen().

See also Edit

Community content is available under CC-BY-SA unless otherwise noted.