HSTRLEN
Syntax
HSTRLEN key field
- Available since:
- Redis Open Source 3.2.0
- Time complexity:
- O(1)
- ACL categories:
-
@read,@hash,@fast, - Compatibility:
- Redis Software and Redis Cloud compatibility
Returns the string length of the value associated with field in the hash stored at key. If the key or the field do not exist, 0 is returned.
Examples
Redis Software and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Integer reply: the string length of the value associated with the field, or zero when the field isn't present in the hash or the key doesn't exist at all.