[Mono-bugs] [Bug 47802][Min] New - Default String.Split() behaviour differs from Microsoft .NET Framework

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 21 Aug 2003 15:26:32 -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 urtext@hfx.andara.com.

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

--- shadow/47802	2003-08-21 15:26:32.000000000 -0400
+++ shadow/47802.tmp.10586	2003-08-21 15:26:32.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 47802
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: urtext@hfx.andara.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Default String.Split() behaviour differs from Microsoft .NET Framework
+
+Description of Problem:
+
+Doing Split() on a string without specifying a delimeter does not split the 
+string in Mono, while the MS .NET Framework splits on whitespace.
+
+Steps to reproduce the problem:
+
+Run the following code:
+
+	static void Main( string[] args ) {
+		string test = "123 456 789";
+		string[] st = test.Split();
+		Console.WriteLine("'" + st[0] + "'");
+		st = test.Split(" "[0]);
+		Console.WriteLine("'" + st[0] + "' '" + st[1] + "' '" + st[2] + 
+"'");
+
+	}
+
+Output using Mono:
+'123 456 789'
+'123' '456' '789'
+
+Output using .NET Framework:
+'123'
+'123' '456' '789'
+
+How often does this happen? 
+
+every time