(last)indexOfAny(index)

While doing string processing I found that std.string is missing indexOfAny(haystack,needles). As in indexOfAny returns the first match of any needle of needles in haystack. You can do.

    string s = "hällo";
    auto r = s.findAmong("ztl");
    auto idx = r.length;

findAmong returns a range and thats very bad in this case as:

    r = s.findAmong("xyz");
    idx = r.length;

is 0 which is wrong as s[0] != 'x'. So you would have to write another branch stmt.

The indexOfAny and lastIndexOfAny follow the indexOf functions already in std.string and return -1 if nothing is found.

comments please