[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: String confusion
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 28 Sep 2012 10:19:53 -0300
> Unless I'm mistaken, using the length operator (#) on a string just calls
> string.len() via metamethod
No, there is a VM instruction for the length operator.
Search for OP_LEN in
http://www.lua.org/source/5.1/lvm.c.html#luaV_execute
http://www.lua.org/source/5.2/lvm.c.html#luaV_execute