CodeSOD: Two Comparisons, Hold the Case
The Daily WTF
NOVEMBER 30, 2021
There are a lot of times when we want string comparisons to be case insensitive. Here, we want to have two different code paths if the Name ends in "2" But we don't want one of those sneaky lower-case 2 s to throw things off, so we make this a case insensitive comparison.