http://d.puremagic.com/issues/show_bug.cgi?id=9103

           Summary: find should work with multiple needles which are
                    elements rather than ranges
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Jonathan M Davis <[email protected]> 2012-12-02 01:12:50 
PST ---
This code works:

import std.algorithm;

void main()
{
    string str = "hello world";
    str = find(str, "h", "j", "\n");
}

This code works:

import std.algorithm;

void main()
{
    string str = "hello world";
    str = find(str, 'h');
}

But this code doesn't:

import std.algorithm;

void main()
{
    string str = "hello world";
    str = find(str, 'h', 'j', '\n');
}

Currently, if you pass multiple needles to find, they must all be ranges.
startsWith and endsWith will work with a combination of elements and ranges.
find should do the same. And since the overload of find which takes multiple
needles uses startsWith, it's that much more ridiculous that find doesn't work
with a combination of ranges and elements like startsWith and endsWith do.

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

Reply via email to