Rawlen
Jump to navigation
Jump to search
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()
.