lua-users home
lua-l archive

Re: microlight review

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


On 2 May 2012 18:32, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Sat, Apr 28, 2012 at 10:45 PM, David Manura <dm.lua@math2.org> wrote:
>> to use Microlight rather than roll their own functions.  As a case in
>> point: ml.escape is currently incompatible with 5.1 due to 0円
>> handling.  Test case to add:
>
> Not sure how to fix this, because the Lua 5.1 handling of 0円 is not consistent:
>
>> =('a000円'):find'000円'
> 2       2
>> =#('a000円'):match'000円'
> 0
>
> i.e. works fine for _finding_, but you get an 'empty' string when matching.
You have to use %z to match embedded nulls; a unexpected lesson I
learnt long ago.
On the other hand; everything works fine with classes (ie; %S will match 0円).
D

AltStyle によって変換されたページ (->オリジナル) /