-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
I'm implementing look-behind in a parser library based on strscan; currently the only way to rewind the character position is this:
pos = @str.charpos - nchars
@str.reset
@str.getch while @str.charpos < pos
which is not the most efficient it could be, with per-character roundtrips to the native extension and back to Ruby… Would be a lot nicer to have a setter for the character position and not just the byte one.
Metadata
Metadata
Assignees
Labels
No labels