ARLEN

ARLEN key
Available since:
Redis Open Source 8.8.0
Time complexity:
O(1)
ACL categories:
ARRAY,

Returns the length of an array (max index + 1).

Required arguments

key

The name of the key that holds the array.

Examples

ARSET myarray 0 "a" ARSET myarray 5 "b" ARLEN myarray ARCOUNT myarray

Return information

Integer reply: The length of the array (max index + 1), or 0 if key does not exist.
RATE THIS PAGE
Back to top ↑