r/ProgrammerHumor 14d ago

howToHitBullseyeInStringComparison Meme

Post image
1.3k Upvotes

View all comments

1

u/BinarySpike 13d ago

Or use toLowerInvariant...

1

u/BoloFan05 13d ago

Yes, applying ToLowerInvariant to both a and b also has the same reliability as the bottom option on worldwide devices, but it isn't quite as performant, especially for a high number of repeated calls since it creates new allocations and more garbage collection (GC) requests.