3 ms·
> True, but the validity check for the constant-width case can be done in constant time. The same is true of UTF-8 because it is self-synchronizing. You only h
by TheCoelacanth 11y ago
> True, but the validity check for the constant-width case can be done in constant time.
The same is true of UTF-8 because it is self-synchronizing. You only have to check that the byte at the given offset is either 0xxxxxxx or 11xxxxxx.
- lisper 11y agoHm, that's a good point.