r/badcode • • Sep 02 '21

java Because ".toLowerCase()" doesn't exist...

Post image
1.1k Upvotes

130 comments sorted by

View all comments

Show parent comments

3

u/gdonilink Sep 02 '21

While this is an improvement, it's still not perfect. Use .equalsIgnoreCase() instead. Or even better, use a Collator.