[Issue 15735] New: std.algorithm.iteration.splitter returns empty range

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Feb 28 15:36:43 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15735

          Issue ID: 15735
           Summary: std.algorithm.iteration.splitter returns empty range
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: dragoscarp at gmail.com

The docs say "If the empty range is given, the result is a range with one empty
element."

---
unittest
{
    import std.algorithm : equal, splitter;

    assert("".splitter('_').equal([""])); // asserts: returned range is empty
}

--


More information about the Digitalmars-d-bugs mailing list