Skip to main content

SETRANGE

Syntax

SETRANGE key offset value

Module

sortedset

Categories

write slow sortedset

Description

Overwrites part of a string value with another by offset. Creates the key if it doesn't exist.

Examples

Overwrite part of a string value:

vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
length, err := vault.SetRange("key", 2, "replacement string")