Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> 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.



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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: