Open johnd0e opened 2 months ago
Many routines are the same as Lua's string module: ... utf8.len
Many routines are the same as Lua's string module:
In fact I see the difference when processing invalid utf8 strings:
local a = "\128\129\130" print(utf8.len(a))
nil 1
This difference can lead to unobvious bugs.
So it must be either documented, or changed to throw error.
In fact I see the difference when processing invalid utf8 strings:
This difference can lead to unobvious bugs.
So it must be either documented, or changed to throw error.