Skip to main content

HSTRLEN

Syntax​

HSTRLEN key field [field ...]

Module​

hash

Categories​

fast hash read

Description​

Return the string length of the values stored at the specified fields. Returns 0 if the value does not exist.

Examples​

Return the string length of the values stored at the specified fields:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
lengths, err := db.HStrLen("key", "field1", "field2", "field3")