lua-users home
lua-l archive

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


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