STRLEN

Usage:
STRLEN key
Complexity:
O(1)
Since:
2.2.0

Returns the length of the string value stored at key. An error is returned when key holds a non-string value.

Examples

127.0.0.1:6379> SET mykey "Hello world"
OK
127.0.0.1:6379> STRLEN mykey
(integer) 11
127.0.0.1:6379> STRLEN nonexisting
(integer) 0