Bug 15735 – std.algorithm.iteration.splitter returns empty range
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-02-28T23:36:43Z
Last change time
2017-10-16T09:58:15Z
Assigned to
No Owner
Creator
Dragos Carp
Comments
Comment #0 by dragoscarp — 2016-02-28T23:36:43Z
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
}
I'm reopening this pending a change in the documentation.
Comment #5 by jrdemail2000-dlang — 2017-10-08T21:49:30Z
(In reply to Andrei Alexandrescu from comment #4)
> I'm reopening this pending a change in the documentation.
PR for the documentation change: https://github.com/dlang/phobos/pull/5767
Comment #6 by github-bugzilla — 2017-10-08T23:34:28Z