Skip to main content

GETRANGE

Note

Official reference: GETRANGE.

Read a substring by byte offsets.

Syntax​

GETRANGE key start end

Offsets start at zero and include the end position. Negative offsets count from the end; -1 is the last byte.

Results​

ReturnRowsContent
ResultSet1VALUE field, STRING type

Example​

SET demo:message hello
GETRANGE demo:message 0 3