STRLEN
STRLEN key
@read, @string, @fast, Returns the length of the string value stored at key. An error is returned when key holds a non-string value.
Integer reply: the length of the string at key, or 0 when key does not exist.
SET mykey "Hello world" STRLEN mykey STRLEN nonexisting
© 2006–2022 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/strlen/