Hacker News new | ask | show | jobs
by vardump 2955 days ago
> I think it would be faster to OR the entire string with itself, then finally check the 8th bit though.

The string could have NUL (zero) bytes in between.

1 comments

You're right that it changes the behavior vs. what the current implementation is, but 0x0 is a valid ASCII character.
While you're technically right NUL is a part of ASCII set in practise it's rarely wanted in the data.