[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: string.gmatch starting position
- From: Enrico Colombini <erix@...>
- Date: Thu, 30 Aug 2018 09:21:09 +0200
On 30-Aug-18 05:17, Daurnimator wrote:
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.