Redis Getrange 命令
Redis 教程
· 2019-03-06 22:12:02
Redis Getrange 命令用于获取存储在指定 key 中字符串的子字符串。字符串的截取范围由 start 和 end 两个偏移量决定(包括 start 和 end 在内)。
语法
redis Getrange 命令基本语法如下:
redis 127.0.0.1:6379> GETRANGE KEY_NAME start end
可用版本
>= 2.4.0
返回值
截取得到的子字符串。
实例
首先,设置 mykey 的值并截取字符串。
redis 127.0.0.1:6379> SET mykey "This is my test key" OK redis 127.0.0.1:6379> GETRANGE mykey 0 3 "This" redis 127.0.0.1:6379> GETRANGE mykey 0 -1 "This is my test key"
点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html
The Everything Store
Brad Stone / Little, Brown and Company / 2013-10-22 / USD 28.00
The definitive story of Amazon.com, one of the most successful companies in the world, and of its driven, brilliant founder, Jeff Bezos. Amazon.com started off delivering books through the mail. Bu......一起来看看 《The Everything Store》 这本书的介绍吧!
Base64 编码/解码
Base64 编码/解码
Markdown 在线编辑器
Markdown 在线编辑器