Saturday 11 April 2015

GETBIT key offset : Get bit value of string at specific offset


Syntax
GETBIT key offset
     Returns the bit value stored at offset.

127.0.0.1:6379> set var 'a' 
OK 
127.0.0.1:6379> getbit var 0 
(integer) 0 
127.0.0.1:6379> getbit var 1 
(integer) 1 
127.0.0.1:6379> getbit var 2 
(integer) 1 
127.0.0.1:6379> getbit var 3 
(integer) 0 
127.0.0.1:6379> getbit var 4 
(integer) 0 
127.0.0.1:6379> getbit var 5 
(integer) 0 
127.0.0.1:6379> getbit var 6 
(integer) 0 
127.0.0.1:6379> getbit var 7 
(integer) 1 
127.0.0.1:6379> getbit var 8 
(integer) 0 



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment