
I was poking around the .NET framework yesterday and came across these three methods in the TextInfo class:
string text = "this is a test string";
System.Globalization.TextInfo info = new System.Globalization.CultureInfo("en-US", false).TextInfo;
// First letter of every word is capitalized.
System.Console.WriteLine(info.ToTitleCase(text));
// Lowercase all letters
// System.Console.WriteLine(info.ToLower(text));
// Uppercase all letters
// System.Console.WriteLine(info.ToUpper(text));
info = new System.Globalization.CultureInfo("de-DE", false).TextInfo;
System.Console.ReadLine();
Nice. :-)