修改本页

Redis 命令 客户端 文档 社区 下载 问题 支持 许可

RPOP key

相关命令

始于1.0.0可用。

时间复杂度: O(1)

Removes and returns the last element of the list stored at key.

返回值

Bulk string reply: the value of the last element, or nil when key does not exist.

例子

redis> RPUSH mylist "one"

  1. (integer) 1

redis> RPUSH mylist "two"

  1. (integer) 2

redis> RPUSH mylist "three"

  1. (integer) 3

redis> RPOP mylist

  1. "three"

redis> LRANGE mylist 0 -1

  1. 1) "one"
  2. 2) "two"
redis>

Comments powered by Disqus

This website is open source software developed by Citrusbyte.

The Redis logo was designed by Carlos Prioglio. See more credits.

Sponsored by Redis Support