D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3242 - splitter does not handle input range made of a unique separator correctly
Summary: splitter does not handle input range made of a unique separator correctly
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: Andrei Alexandrescu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 08:21 UTC by baptiste.lepilleur
Modified: 2015-06-09 05:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description baptiste.lepilleur 2009-08-10 08:21:37 UTC
Notes: I found this while porting the splitter range algo to C++. Notes that I don't know D, so I may have missed something.

Below is an additional unit test that fails when porting the algorithm to C++:

unittest
{
    auto s6 = ",";
    auto sp6 = splitter(s6, ',');
    assert(equal(sp6, ["", ""][]));
}
Comment 1 Andrei Alexandrescu 2009-08-10 08:24:22 UTC
Thanks, will look into it.