endsWith

Array-specialization of endsWith with default predicate.

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

Examples

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

Meta