lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Rici Lake wrote:
> Perhaps. But why would you want to know?
> 
> The closest I usually come to this question is asking whether a table
> is empty, or sometimes if it has more than one key/value pair. The
> following are useful:
> 
> function is_empty(t) return next(t) == nil end

That's my need exactly. I'll use that instead. Thanks. :)