code | type | title |
---|---|---|
true |
page |
bitpos |
Returns the position of the first bit set to 1 or 0 in a string, or in a substring.
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 |
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 |
Resolves to the position of the first bit found matching the searched value.
<<< ./snippets/bitpos.js