any

Array-specialization of any with element needle.

@trusted
bool
any
(
T
)
(
scope const T[] haystack
,
scope const T needle
)

Examples

assert(!"".any('a'));  // matches behaviour of `std.algorithm.searching.any`
assert("aaa".any('a'));
assert("aa_".any('a'));
assert(!"_".any('a'));

Meta