isAmong

template isAmong(values...)
bool
isAmong
(
Value
)
(
Value value
)
if (
haveCommonType!(Value, values)
)
if (
isExpressionTuple!values &&
values.length != 0
)

Return Value

true iff value is equal to any of values, false otherwise.

Examples

assert(`b`.isAmong!(`a`, `b`));
assert(!`c`.isAmong!(`a`, `b`));

Meta