Bug 8013 – splitter() and split() give different results

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-05-01T17:37:00Z
Last change time
2013-11-17T18:53:35Z
Assigned to
monarchdodra
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-05-01T17:37:13Z
import std.stdio: writeln; import std.string: split; static import std.algorithm; static import std.array; void main() { auto s = " a message "; writeln(split(s)); writeln(std.algorithm.splitter(s)); writeln(std.array.splitter(s)); } Output, DMD 2.060alpha: ["a", "message"] ["", "a", "message"] ["", "a", "message"] Expected output: ["a", "message"] ["a", "message"] ["a", "message"]
Comment #1 by monarchdodra — 2012-10-22T13:49:14Z
Taking this too. Any other split-related bug I missed?
Comment #2 by bearophile_hugs — 2012-10-22T15:12:56Z
(In reply to comment #1) > Taking this too. Any other split-related bug I missed? I don't know what you have missed, but see also: http://d.puremagic.com/issues/show_bug.cgi?id=4764 http://d.puremagic.com/issues/show_bug.cgi?id=5838 http://d.puremagic.com/issues/show_bug.cgi?id=6730 http://d.puremagic.com/issues/show_bug.cgi?id=7689
Comment #3 by bearophile_hugs — 2013-11-17T18:53:35Z