GETRANGE | SugarDB (original) (raw)
Syntax
GETRANGE key start end
Module
string
Categories
read slow string
Description
Return the substring of the string value stored at key. The substring is specified by the start and end indexes.
Examples
- Go (Embedded)
- CLI
Get the substring of a string value:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
substring, err := db.GetRange("key", 4, 10)