Skip to content

Commit

Permalink
修复 SETRANGE 命令中将“zerobtyes”翻译成“零比特”的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzworks committed Nov 23, 2012
1 parent 5397231 commit 6464da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion string/setrange.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SETRANGE

不存在的 ``key`` 当作空白字符串处理。

`SETRANGE`_ 命令会确保字符串足够长以便将 ``value`` 设置在指定的偏移量上,如果给定 ``key`` 原来储存的字符串长度比偏移量小(比如字符串只有 ``5`` 个字符长,但你设置的 ``offset`` 是 ``10`` ),那么原字符和偏移量之间的空白将用零比特(zerobytes, ``"\x00"`` )来填充。
`SETRANGE`_ 命令会确保字符串足够长以便将 ``value`` 设置在指定的偏移量上,如果给定 ``key`` 原来储存的字符串长度比偏移量小(比如字符串只有 ``5`` 个字符长,但你设置的 ``offset`` 是 ``10`` ),那么原字符和偏移量之间的空白将用零字节(zerobytes, ``"\x00"`` )来填充。

注意你能使用的最大偏移量是 2^29-1(536870911) ,因为 Redis 字符串的大小被限制在 512 兆(megabytes)以内。如果你需要使用比这更大的空间,你可以使用多个 ``key`` 。

Expand Down

0 comments on commit 6464da9

Please sign in to comment.