Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.47 KB

index.md

File metadata and controls

43 lines (29 loc) · 1.47 KB
code type title
true
page
bitpos

bitpos

Returns the position of the first bit set to 1 or 0 in a string, or in a substring.

[Redis documentation]

Arguments

bitpos(key, bit, [options]);

Arguments Type Description
key
string
Key
bit
integer
Bit to look for.
Accepted values: 0, 1
options
object
Optional query arguments

options

The options arguments can contain the following option properties:

Property Type (default) Description
end
integer
Search ends at the provided offset
queuable
boolean (true)
If true, queues the request during downtime, until connected to Kuzzle again
start
integer
Search starts at the provided offset

Resolve

Resolves to the position of the first bit found matching the searched value.

Usage

<<< ./snippets/bitpos.js