News for hackers. Stuff that matters.
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?
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.
Re:How quickly can you remove spaces from a string? by averell on Friday January 20, 2017 @03:27PM (#13446727)
No, the article states the method will correctly remove the mentioned whitespace characters even from UTF-8 text, because they are part of the 7 bit subset this method works on.