glob icon indicating copy to clipboard operation
glob copied to clipboard

Correctly handle non-ASCII runes in patterns (fixes #54)

Open calmh opened this issue 3 years ago • 0 comments
trafficstars

When matching a row we calculate an index into the string, and this index was in runes. However when slicing the string Go uses byte indexes. This change tracks both, using the rune count to determine the correct length and the byte index to slice the string.

calmh avatar Jun 15 '22 08:06 calmh