[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work2) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 23 Mar 2014 15:59:21 -0300
> > utf8.len('')
> stdin:1: bad argument #1 to 'len' (initial position out of string)
This is a (surprising) bug. Thanks for the report. (How did we not have
a test for that case??)
> > utf8.offset('a', 0, 3)
> stdin:1: bad argument #3 to 'offset' (position out of range)
> [...]
> > utf8.offset('a', 0, 2)
> 2
>
> I expect start offsets of 2 and 3 would both raise errors.
Position 2 is exaclty *after* the 'a'; it seems useful to allow
that position as valid.
> There is a typo in the manual for utf8.len: 'sufix' should be 'suffix'.
Thanks.
-- Roberto