SISMEMBER

Since 1.1.0Sets

Syntax

SISMEMBER key member
  • Flags: fast, readonly
  • ACL categories: @fast, @read, @set
  • Arity: 3

Tells whether member is in the set at key.

Reply

  • 1 if it is, 0 if not or if the key does not exist.

Examples

> SADD s a b
(integer) 2
> SISMEMBER s a
(integer) 1
> SISMEMBER s z
(integer) 0