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 -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -