Redis Setbit 命令

Redis 教程 · 2019-03-06 23:13:06

Redis Setbit 命令用于对 key 所储存的字符串值,设置或清除指定偏移量上的位(bit)。

语法

redis Setbit 命令基本语法如下:

redis 127.0.0.1:6379> Setbit KEY_NAME OFFSET

可用版本

>= 2.2.0

返回值

指定偏移量原来储存的位。

实例

redis> SETBIT bit 10086 1
(integer) 0

redis> GETBIT bit 10086
(integer) 1

redis> GETBIT bit 100   # bit 默认被初始化为 0
(integer) 0

点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html

查看所有标签

Understanding Computation

Understanding Computation

Tom Stuart / O'Reilly Media / 2013-6-3 / USD 39.99

Finally, you can learn computation theory and programming language design in an engaging, practical way. Understanding Computation explains theoretical computer science in a context you'll recognize, ......一起来看看 《Understanding Computation》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具