endsWith

Array-specialization of endsWith with default predicate.

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

Examples

const x = "beta version";
assert(x.endsWith("version"));
assert(x.endsWith('n'));
assert(!x.endsWith("_"));
assert(!"".endsWith("_"));
assert(!"".endsWith('_'));

Meta