bitpos
Returns the position of the first bit set to 1 or 0 in a string, or in a substring.
Query Syntax
HTTP
URL: http://kuzzle:7512/ms/_bitpos/<_id>?bit=[0|1][&start=<integer>&end=<integer>]
Method: GET
Other protocols
{
"controller": "ms",
"action": "bitpos",
"_id": "<key>",
"bit": "[0|1]",
"start": <integer>,
"end": <integer>
}
Arguments
_id
: key to examinebit
: bit to look for. Accepted values:0
,1
Optional:
start
: search starts at the provided offsetend
: search ends at the provided offset
Response
Returns the position of the first bit found matching the searched value.
{
"requestId": "<unique request identifier>",
"status": 200,
"error": null,
"controller": "ms",
"action": "bitpos",
"collection": null,
"index": null,
"result": 42
}