Redis Getrange 命令

更新时间: 2019-07-07 15:54

Redis Getrange 命令用于获取存储在指定 key 中字符串的子字符串。字符串的截取范围由 start 和 end 两个偏移量决定(包括 start 和 end 在内)。

语法

redis 127.0.0.1:6379> GETRANGE KEY_NAME start end

返回值

截取得到的子字符串。

实例

127.0.0.1:6379> get domain
(nil)
127.0.0.1:6379> set domain www.codercto.com
OK
127.0.0.1:6379> getrange domain 0 4
"www.c"
127.0.0.1:6379> getrange domain 0 6
"www.cod"

查看更多 Redis 字符串(String)命令

Programming Amazon Web Services

Programming Amazon Web Services

James Murty / O'Reilly Media / 2008-3-25 / USD 49.99

Building on the success of its storefront and fulfillment services, Amazon now allows businesses to "rent" computing power, data storage and bandwidth on its vast network platform. This book demonstra......一起来看看 《Programming Amazon Web Services》 这本书的介绍吧!

HTML 编码/解码

HTML 编码/解码

HTML 编码/解码

XML、JSON 在线转换

XML、JSON 在线转换

在线XML、JSON转换工具

HSV CMYK 转换工具

HSV CMYK 转换工具

HSV CMYK互换工具