[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How many elements in this table?
- From: Eric Tetz <erictetz@...>
- Date: Mon, 21 Mar 2005 01:38:31 -0800
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. :)