Difference between InvariantCulture and Ordinal string comparison

When comparing two strings in c# for equality, what is the difference between InvariantCulture and Ordinal comparison? 9 s 9 It does matter, for example – there is a thing called character expansion var s1 = “Strasse”; var s2 = “Straße”; s1.Equals(s2, StringComparison.Ordinal); //false s1.Equals(s2, StringComparison.InvariantCulture); //true With InvariantCulture the ß character gets expanded to … Read more

What is the correct way to check for string equality in JavaScript?

What is the correct way to check for equality between Strings in JavaScript? 9 s 9 always Until you fully understand the differences and implications of using the == and === operators, use the === operator since it will save you from obscure (non-obvious) bugs and WTFs. The “regular” == operator can have very unexpected … Read more