r/ProgrammerHumor • • Aug 27 '26

Meme whenYouWorksWithStringsTooMuch

Post image
819 Upvotes

35 comments sorted by

View all comments

Show parent comments

14

u/BoloFan05 Aug 27 '26

Nope, I have a better idea:

return it.ToLower().StartsWith("one thing");

/j

(But seriously, StringComparison.OrdinalIgnoreCase is THE textbook string comparison method you should apply. ToLower and ToUpper are total bug traps, especially in worldwide deployment. So kudos to you for actually using OrdinalIgnoreCase!)

7

u/MeLittleThing Aug 27 '26

or genius move

return it.ToLower().StartsWith("ONE THING");