Method: Redis::Commands::Bitmaps#bitpos
- Defined in:
- lib/redis/commands/bitmaps.rb
#bitpos(key, bit, start = nil, stop = nil, scale: nil) ⇒ Integer
Return the position of the first bit set to 1 or 0 in a string.
62 63 64 65 66 67 68 69 70 |
# File 'lib/redis/commands/bitmaps.rb', line 62 def bitpos(key, bit, start = nil, stop = nil, scale: nil) raise(ArgumentError, 'stop parameter specified without start parameter') if stop && !start command = [:bitpos, key, bit] command << start if start command << stop if stop command << scale if scale send_command(command) end |