Module Hub Beta


srclist dstlist count

Moves count elements from the tail of srclist to the head of dstlist.

If less than count elements are available, it moves as much elements as possible.

Return Value

Integer reply: the length of the list at srclist after the operation.


redis> LPUSH mylist one
(integer) 1
redis> LPUSH mylist two
(integer) 2
redis> LPUSH mylist three
(integer) 3
redis> LSPLICE mylist myotherlist 2
(integer) 1
redis> LRANGE mylist 0 -1
1) “three”
redis> LRANGE myotherlist 0 -1
1) “two”
2) “one”

© 2017 Redis Labs, Inc. All rights reserved.