ScardCommand: Contents
  SCARD _key_
    Return value
    See also

ScardCommand

SCARD _key_

Time complexity O(1)
Return the set cardinality (number of elements). If the key does notexist 0 is returned, like for empty sets. If the key does not holda set value -1 is returned. Client libraries should raise an errorwhen -1 is returned instead to pass the value to the caller.

Return value

Integer reply, specifically:

the cardinality (number of elements) of the set as an integer `>=` 0 if the operation succeeded
-2 if the specified key does not hold a set value

See also