endsWithAmong

Undocumented in source. Be warned that the author may not have intended to support it.
  1. bool endsWithAmong(T[] haystack, T[][] needles)
    bool
    endsWithAmong
    (
    T
    )
    (
    scope const T[] haystack
    ,
    scope const T[][] needles
    )
  2. bool endsWithAmong(T[] haystack, T[] needles)
  3. bool startsWith(T[] haystack, T[] needle)
  4. bool startsWith(T[] haystack, T needle)

Examples

const x = "beta version";
assert(x.endsWithAmong(["version", ""]));
assert(x.endsWithAmong(['n', ' ']));
assert(x.endsWithAmong("n "));
assert(!x.endsWithAmong(["_"]));
assert(!x.endsWithAmong(['_']));

Meta