[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: String confusion
- From: Duncan Cross <duncan.cross@...>
- Date: Fri, 28 Sep 2012 14:19:44 +0100
On Fri, Sep 28, 2012 at 2:14 PM, Craig Barnes <craigbarnes85@gmail.com> wrote:
> Unless I'm mistaken, using the length operator (#) on a string just calls
> string.len() via metamethod, which is indeed part of the string library and
> not the "raw Lua interpreter".
You are mistaken. # for strings is hard-coded, the metatable given to
strings by the string module has no __len metamethod.
-Duncan