gobwas / glob

Go glob
MIT License
948 stars 63 forks source link

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

Open calmh opened 2 years ago

calmh commented 2 years ago

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.