Re:How quickly can you remove spaces from a string?
by delinka on Friday January 20, 2017 @03:21PM
(#13446683)
Do you mean to say that TFA makes the incorrect assumption that UTF-8 is a single byte encoding?
[ Parent
| on HN ]
Re:How quickly can you remove spaces from a string?
by MereInterest on Friday January 20, 2017 @05:48PM
(#13447593)
One neat thing about UTF-8 is that all bytes that compose non-ASCII characters will have the high bit set. ASCII values range from 0-127, so no ASCII values will ever have the high bit set. Therefore, a byte that corresponds to an ASCII value is guaranteed to be the same character as the corresponding ASCII encoding.