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 [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=79672

--- shadow/79672        2006-10-16 12:49:58.000000000 -0400
+++ shadow/79672.tmp.29320      2006-10-16 12:49:58.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 79672
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: CORLIB
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: String.Split incorrect behavior with RemoveEmptyEntries
+
+Description of Problem:
+String.Split returns the wrong number of substrings when using
+StringSplitOptions.RemoveEmptyEntries and specifying a maximum number of
+substrings to return.
+
+Example program to reproduce this bug:
+class TestProgram
+{
+ static void Main()
+  {
+   System.Console.WriteLine(string.Join(", ",
+    "a--b--c-d-e".Split(new char[]{'-'},4,
+    System.StringSplitOptions.RemoveEmptyEntries)));
+  }
+}
+
+Actual Results:
+a, b, -c-d-e
+(3 items returned from Split)
+
+Expected Results:
+a, b, c, d-e
+(4 items returned from Split)
+
+How often does this happen? 
+Always.
+
+Additional Information:
+Microsoft .NET implements this correctly.
+
+I would consider this a "Critical" bug because it's an incorrect
+implementation of a core component, and will cause correctly-written
+applications to behave incorrectly.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to