What case to use when comparing strings in Microsoft programming languages? -


Note: This is a question, I'm asking more than historical interest, as I I know

When comparing two strings of an unknown matter, I am remembering that in Microsoft-based conversion methods where optimized for uppercase rather than lowercase. Therefore:

  if (string A.Tupper () == stringB.ToUpper ()) {...}  

will be faster than this:

  if (stringA.ToLower () == stringB.ToLower ()) {...}  

If this is true, then what is this store Better to do when you want to find it, then string data is upper than the lower case?

We can do something in .NET like this:

  If (String.Compressor (String A, Stringb, String Communications, Inventory Culture Ignore Case) == 0) {...}  

and change the wire in upper or lower case There is no need to worry about it more.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -