isAmong

  1. bool isAmong(Value value, Values values)
    bool
    isAmong
    (
    alias pred =
    (
    a
    ,
    b
    )
    => a == b
    Value
    Values...
    )
    (
    Value value
    ,
    Values values
    )
    if (
    Values.length != 0
    )
  2. template isAmong(values...)

Return Value

Type: bool

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

Examples

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

Meta