lua-users home
lua-l archive

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


On 8 April 2014 10:34, Shmuel Zeigerman <shmuz@013net.net> wrote:
We are using 'slnunicode' library and str:len() means for us unicode.utf8.len(str) due to string metatable's __index being redefined.

For consistency sake I'd like string.len to stay.

In 5.2 the __len metamethod actually works on tables now.
Have you considered wrapping your utf8 strings in tables so you can provide extra features?

The one downside is using them as a table key.