Hash

HSTRLEN

Returns the string length of a value in a hash.

Arguments

keybodystrrequired

The key of the hash.

fieldbodystrrequired

The name of the field.

Response

intrequired

0 if the hash or field does not exist. Otherwise the length of the string.

Example
length = redis.hstrlen("key", "field")
Loading search…