[Mono-bugs] [Bug 601772] String.Split() can return too many substrings
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jun 8 11:39:31 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=601772
http://bugzilla.novell.com/show_bug.cgi?id=601772#c1
Jonathan Pryor <jpryor at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |CLOSED
CC| |jpryor at novell.com
Resolution| |FIXED
--- Comment #1 from Jonathan Pryor <jpryor at novell.com> 2010-06-08 15:39:30 UTC ---
Fixed in trunk r158670 and the mono-2-6 branch r158671:
2010-06-08 Jonathan Pryor <jpryor at novell.com>
* System/String.cs: Fix String.Split(String[],int,StringSplitOptions)
so that:
- it properly obeys the 'count' parameter; Fixes #601772.
- "...".Split(new[]{"."}, 2,
StringSplitOptions.RemoveEmptyEntries).Length==0
- "A..".Split (new String[] { "." }, 2,
StringSplitOptions.RemoveEmptyEntries) == new[]{"A"}
- Remove duplicative array handling code by using List<String>.
* Test/System/StringTest.cs: Add tests for #601772 (i.e. take
SplitStringChars(), change all the chars to Strings, and things
should work).
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list