startsWithAmong

Undocumented in source. Be warned that the author may not have intended to support it.
  1. bool startsWithAmong(T[] haystack, T[][] needles)
    bool
    startsWithAmong
    (
    T
    )
    (
    scope const T[] haystack
    ,
    scope const T[][] needles
    )
  2. bool startsWithAmong(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.startsWithAmong(["beta", "version", ""]));
assert(x.startsWithAmong(['b', ' ']));
assert(x.startsWithAmong("b "));
assert(!x.startsWithAmong(["_"]));
assert(!x.startsWithAmong(['_']));

Meta