LLEN

Since 1.1.0Lists

Syntax

LLEN key
  • Flags: fast, readonly
  • ACL categories: @fast, @list, @read
  • Arity: 2

Returns the number of elements in the list at key.

Reply

  • The length; 0 if the key does not exist.
  • A WRONGTYPE error if the key is not a list.

Examples

> RPUSH l a b c
(integer) 3
> LLEN l
(integer) 3
> LLEN missing
(integer) 0