GETBIT

Since 1.1.0Bitmaps

Syntax

GETBIT key offset
  • Flags: fast, readonly
  • ACL categories: @bitmap, @fast, @read
  • Arity: 3

Returns the bit at offset in the string at key.

Reply

  • 0 or 1; 0 if the offset is past the end of the string, or the key does not exist.

Examples

> SETBIT b 1 1
(integer) 0
> GETBIT b 1
(integer) 1
> GETBIT b 100
(integer) 0