lua-users home
lua-l archive

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


> what do yo think about incorporating something like my proposed patch
> to make a future lua version (like 5.2) string lib pattern matching
> embedded 0 aware?

Lua 5.2 will accept embedded \0s in patterns.

Two details about your patch:

- It seems simpler to keep the pattern end address in structure
MatchState, instead of adding it as an extra parameter to several
functions.

- I think you forgot to change matchbalance. (My bad: its code uses
0 instead of '\0'...)

-- Roberto