Language: C#
No Title
// Comparing C# to the "Java’s toLowerCase() has got a surprise for you!" article: // http://javapapers.com/core-java/javas-tolowercase-has-got-a-surprise-for-you/ // ------------------------------------------------------------ // NOTE: C# doesn't seem to exhibit the same issue. // ------------------------------------------------------------ static void Main(string[] args) { // setting Lithuanian as locale System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("lt"); const string str = "\u00cc"; // Java & C# = Ì Console.WriteLine("Before case conversion is {0} and length is {1}" , str, str.Length); string lowerCaseStr = str.ToLower(); // Java = i?` // C# = ì Console.WriteLine("Lower case is {0} and length is {1}" , lowerCaseStr, lowerCaseStr.Length); Console.ReadLine(); return; }
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

