startsWith

Array-specialization of startsWith with default predicate.

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

Examples

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

See Also

Meta