[Mono-bugs] [Bug 62160][Wis] New - String.LastIndexOf does not work properly.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 30 Jul 2004 16:46:19 -0400 (EDT)
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 andreas.hausladen@gmx.de.
http://bugzilla.ximian.com/show_bug.cgi?id=62160
--- shadow/62160 2004-07-30 16:46:19.000000000 -0400
+++ shadow/62160.tmp.27067 2004-07-30 16:46:19.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 62160
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: Andreas.Hausladen@gmx.de
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: String.LastIndexOf does not work properly.
+
+The String.LastIndexOf() method does not return the correct index. In the
+following example it returns -1 instead of 9.
+
+
+using System;
+
+namespace MonoTest
+{
+ public class Test
+ {
+ public static void Main(String[] args)
+ {
+ string text = "QBitArray::bitarr_data";
+ Console.WriteLine("text=\"{0}\"", text);
+ Console.WriteLine("text.IndexOf(\"::\")={0}",
+text.IndexOf("::"));
+ Console.WriteLine("text.LastIndexOf(\"::\")={0}",
+text.LastIndexOf("::"));
+ }
+ }
+}
+
+Actual Results:
+
+text="QBitArray::bitarr_data"
+text.IndexOf("::")=9
+text.LastIndexOf("::")=-1
+
+
+Expected Results:
+
+text="QBitArray::bitarr_data"
+text.IndexOf("::")=9
+text.LastIndexOf("::")=9