Thread overview
[Issue 2903] New: Splitter should be bi-dir if the input range is bi-dir
Apr 27, 2009
d-bugmail
Aug 18, 2010
David Simcha
April 27, 2009
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: bugzilla@digitalmars.com
        ReportedBy: braddr@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.


-- 

October 11, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2903


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|nobody@puremagic.com        |andrei@metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 18, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2903


David Simcha <dsimcha@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |dsimcha@yahoo.com
         Resolution|                            |FIXED


--- Comment #1 from David Simcha <dsimcha@yahoo.com> 2010-08-17 21:07:53 PDT ---
Fixed SVN.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------