SUBSTR
Returns a substring selected by byte offsets.
Strings · Example verified
Syntax covered here
SUBSTR key start endThe tested range uses zero-based offsets and includes both endpoints, matching the GETRANGE example.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> SET greeting hello
"OK"
# connection: default
> SUBSTR greeting 1 3
"ell"