Redis Getbit 命令
Redis 教程
· 2019-03-06 22:41:31
Redis Getbit 命令用于对 key 所储存的字符串值,获取指定偏移量上的位(bit)。
语法
redis Getbit 命令基本语法如下:
redis 127.0.0.1:6379> GETBIT KEY_NAME OFFSET
可用版本
>= 2.2.0
返回值
字符串值指定偏移量上的位(bit)。
当偏移量 OFFSET 比字符串值的长度大,或者 key 不存在时,返回 0 。
实例
# 对不存在的 key 或者不存在的 offset 进行 GETBIT, 返回 0 redis> EXISTS bit (integer) 0 redis> GETBIT bit 10086 (integer) 0 # 对已存在的 offset 进行 GETBIT redis> SETBIT bit 10086 1 (integer) 0 redis> GETBIT bit 10086 (integer) 1
点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html
CSS3 For Web Designers
Dan Cederholm / Happy Cog / 2010-11 / $18
From advanced selectors to generated content to the triumphant return of web fonts, and from gradients, shadows, and rounded corners to full-blown animations, CSS3 is a universe of creative possibilit......一起来看看 《CSS3 For Web Designers》 这本书的介绍吧!