代潇瑞博客

getRange 命令/方法/函数

getRange(substr also supported but deprecated in redis)


Description

Return a substring of a larger string

返回字符串的一部分


Parameters

key start end


Return value

STRING: the substring


Example

$redis->set('key', 'string value');

$redis->getRange('key', 0, 5); /* 'string' */

$redis->getRange('key', -5, -1); /* 'value' */

【相关命令】

触屏版 | 电脑版

Copyright © 2013 代潇瑞博客手机版

QQ: 446673330

粤ICP备13071969号-1