SUBSTR
Note
Official reference: SUBSTR.
Read a substring by byte offsets; this is the old name of GETRANGE.
Syntax
SUBSTR key start end
Offsets start at zero and include the end position. Negative offsets count from the end; -1 is the last byte.
Use GETRANGE in new code.
Results
| Return | Rows | Content |
|---|---|---|
| ResultSet | 1 | VALUE field, STRING type |
Example
SET demo:message hello
SUBSTR demo:message 0 3