4 ms·
For that use case it is better to compare case insensitively with "yes" instead of converting the input to lower case first.
by TorKlingberg 13y ago
For that use case it is better to compare case insensitively with "yes" instead of converting the input to lower case first.
- zokier 13y agoHow do you do case-insensitive comparison without normalizing the case of the operands?
- gnaritas 13y agoMost string compare routines in the library offer a case insensitive compare option already, you don't have to normalize it.
- asveikau 13y agoIf you can compare case-insensitively then you (or the library you call into) must be aware of case and you face the exact same problems. It's a pretty good thought exercise to attempt writing your own Unicode-aware case insensitive string compare. A lot of people call into libraries for this stuff without realizing how complex the problem gets.