3 ms·
Yes, you should validate the UTF-8 at some point before you actually manipulate the contents of the string. Before that, you can just treat it as a pile of byte
by rspeer 10y ago
Yes, you should validate the UTF-8 at some point before you actually manipulate the contents of the string. Before that, you can just treat it as a pile of bytes.
You don't need to go down different paths of how you read those bytes based on the codepoint lengths until you're actually doing something with codepoints.