News for hackers. Stuff that matters.
Re:UTF-8 Everywhere (2012) by Avernar on Sunday June 19, 2016 @05:48PM (#11934852)
> You might want to slice the quotes off of a quoted string

That's why I really like dealing with UTF-8. As you said you can just index by byte instead of having to worry about code point boundries. This is because a code point will never match inside a larger code point.

So if I search for a one byte quote character it will never match the second, third or fourth bytes in a larger code point. Same with other control characters.

Works when searching for 2 or 3 byte code points as well.

There are no comments on this comment yet.