The OpenD Programming Language

containsAny

@trusted pure nothrow @nogc
bool
containsAny
(
C
size_t L
)
(
scope const(C)[] str
,
const C[L] chars...
)
if (
L
)

Examples

import mir.test: should;

assert("     hello world     ".containsAny('w'));
assert(!"     hello world     ".containsAny('W'));
assert("     hello world     ".containsAny('W', 'e'));
assert("     hello world     ".containsAny("We"));

Meta