HSTRLEN

Syntax
HSTRLEN key field
Available since:
3.2.0
Time complexity:
O(1)
ACL categories:
@read, @hash, @fast,

返回存储在key中的哈希表中与field关联的值的字符串长度。如果keyfield不存在,则返回0。

示例

HSET myhash f1 HelloWorld f2 99 f3 -256 HSTRLEN myhash f1 HSTRLEN myhash f2 HSTRLEN myhash f3

RESP2/RESP3 回复

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.
RATE THIS PAGE
Back to top ↑