endsWithEither

Array-specialization of endsWith with default predicate.

  1. bool endsWithEither(T[] haystack, T[][] needles)
  2. bool endsWithEither(T[] haystack, T[] needles)
    @trusted
    bool
    endsWithEither
    (
    T
    )
    (
    scope const T[] haystack
    ,
    scope const T[] needles
    )
  3. bool startsWith(T[] haystack, T[] needle)
  4. bool startsWith(T[] haystack, T needle)

Examples

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

Meta