APPEND
Syntax
APPEND key value
Module
stringCategories
write fast stringDescription
Appends a value to the end of a string. If the doesn't exist, it creates the key with the value (acts as a SET). Returns the length of the string after the append operation.
Examples
- Go (Embedded)
- CLI
Append a value to the end of a string:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
len, err := db.Append("key", "value")
Append a value to the end of a string:
> APPEND "key" "value"