On 30-Aug-18 05:17, Daurnimator wrote:
> Hi Roberto,
> A feature request that would make some code simpler and faster:
> It would be great if string.gmatch took a position argument that was
> used as the starting offset.
> This would line up with string.match and string.find.
> Looking at the implementation in lstrlib.c it should be very simple to add.
Yes, it could be very useful when parsing large strings. I missed this
feature when I wrote a tiny gstring.match-based XML parser some time ago.
I prefer lua string type can support string slice, A small string slice can share a part of large string.