digitalmars.D.bugs - [Issue 10772] New: std.regex.splitter generates spurious empty elements with empty delimiter
- d-bugmail puremagic.com (31/31) Aug 07 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10772
http://d.puremagic.com/issues/show_bug.cgi?id=10772 Summary: std.regex.splitter generates spurious empty elements with empty delimiter Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: hsteoh quickfur.ath.cx CODE: -------- void main() { import std.string, std.stdio, std.regex; string s = "test"; writeln(std.regex.splitter(s.toUpper, regex(""))); } -------- Output: -------- ["", "T", "E", "S", "T", ""] -------- The first and last empty elements should not be included in the result. Cf. Perl's split(//, "test"). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 07 2013