Skip to main content

APPEND

Syntax

APPEND key value

Module

string

Categories

write fast string

Description

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

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")