lua-users home
lua-l archive

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

On Mon, Jan 3, 2011 at 2:03 PM, Tony Finch <> wrote:
>> On Sat, Jan 01, 2011 at 10:23:17PM +0200, David J. Slate wrote:
>>> As applied to strings # does, returning unambiguously the length
>>> of the string.
> It returns the length of the string in bytes which is usually not the same as the number of code points or glyphs.

This is the only choice, since the contents of a Lua string might well
be binary data, and not any sort of text at all.  (Of course you know
this; I just think this example highlights why calling the length in
bytes the "length of" a Lua string is unobjectionable.)

Greg F