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

It's so annoying how so many languages lack a basic "ASCII lowercase" and "ASCII uppercase" function. All the Unicode logic is not only unnecessary, but actively unwanted, when you e.g want to change the case of a hex encoded string or do normalization on some machine generated ASCII-only output.


I'll say, C#'s .ToLowerInvariant, etc. are pretty nice when you need them.


> It's so annoying how so many languages lack a basic "ASCII lowercase" and "ASCII uppercase" function

How about b''.lower() ?


What if I have a string and not a byte string?




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

Search: