STRLEN | SugarDB (original) (raw)

Syntax

STRLEN key

Module

string

Categories

fast read string

Description

Returns length of the key's value if it's a string.

Examples

Get the substring of a string value:

db, err := sugardb.NewSugarDB()
if err != nil {
  log.Fatal(err)
}
length, err := db.StrLen("key")

PreviousSETRANGENextSUBSTR