content/commands/strlen.md
Returns the length of the string value stored at key.
An error is returned when key holds a non-string value.
{{% redis-cli %}} SET mykey "Hello world" STRLEN mykey STRLEN nonexisting {{% /redis-cli %}}
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |
{{< multitabs id="strlen-return-info" tab1="RESP2" tab2="RESP3" >}}
Integer reply: the length of the string stored at key, or 0 when the key does not exist.
-tab-sep-
Integer reply: the length of the string stored at key, or 0 when the key does not exist.
{{< /multitabs >}}