http://d.puremagic.com/issues/show_bug.cgi?id=2903
Summary: Splitter should be bi-dir if the input range is bi-dir Product: D Version: 2.029 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: bugzi...@digitalmars.com ReportedBy: bra...@puremagic.com obviously there's 'better' ways of doing this, but use it an a contrived example: string inputpath = "/a/b"; auto parts = splitter(inputpath, "/"); // parts is ["", "a", "b"] parts.popFront; // get rid of empty leading part auto file = parts.back; parts.popBack; writefln("file = %s", file); auto path = reduce!(q{a ~= "/" ~ b})("", parts); writefln("path = %s", path); Problem: Splitter is strictly a forward range currently. --