[Mono-bugs] [Bug 80056][Blo] New - IgnoreCase doesn't work in StringComparison and CompareInfo
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Nov 26 09:53:19 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by noup at users.sourceforge.net.
http://bugzilla.ximian.com/show_bug.cgi?id=80056
--- shadow/80056 2006-11-26 09:53:19.000000000 -0500
+++ shadow/80056.tmp.6820 2006-11-26 09:53:19.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 80056
+Product: Mono: Class Libraries
+Version: 1.2
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: noup at users.sourceforge.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: IgnoreCase doesn't work in StringComparison and CompareInfo
+
+Running the following test case doesn't seem to produce valid results:
+
+#################################
+using System;
+using System.Globalization;
+
+public class Test {
+public static void Main () {
+ string text = "ola";
+ string text2 = "OLA";
+ Console.WriteLine(text.IndexOf(text2,
+StringComparison.OrdinalIgnoreCase));
+ CompareInfo compare = CultureInfo.InvariantCulture.CompareInfo;
+ Console.WriteLine(compare.IndexOf(text, text2,
+CompareOptions.OrdinalIgnoreCase));
+ Console.WriteLine(compare.IndexOf(text, text2,
+CompareOptions.IgnoreCase));
+}
+}
+#################################
+
+Output:
+-1
+-1
+0
+
+The expected output is "0" for all comparisons.
More information about the mono-bugs
mailing list