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

Decomposing things just to have different equality notions doesn't generalize.

How would you decompose a character string so that you could have a case-insensitive versus sensitive comparison?

:)





> How would you decompose a character string

With a capitalization bit mask of course!

And you can speed up full equality comparisons with a quick cap equality check first.

(That is the how. The when is probably "never". :)


Don't forget to store the locale used for capitalization, too.



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

Search: