Skip to main content

LTRIM

Note

Official reference: LTRIM.

Keep only the elements in an index range.

Syntax

LTRIM key start stop

start/stop are zero-based and inclusive; -1 denotes the last element.

Results

ReturnRowsContent
Update count--1 if successful, 0 otherwise. (Success when status is "OK")

Example

RPUSH demo:queue first second third
LTRIM demo:queue 0 1