bitpos(
key: KeyT,
bit: int,
start: Optional[int] = None,
end: Optional[int] = None,
mode: Optional[str] = None
) → ResponseT
BITPOS(
key: RedisArgument,
bit: BitValue,
start?: number,
end?: number,
mode?: 'BYTE' | 'BIT'
) → Any
bitpos(
key: byte[],
value: boolean
) → long
bitpos(
key: Any,
value: Any,
BitPosParams(: new
) → return
bitpos(
key: byte[],
value: boolean,
params: BitPosParams
) → long
bitpos(
key: String,
value: boolean
) → long
bitpos(
key: String,
value: boolean,
params: BitPosParams
) → long
bitpos(
key: K, // the key.
state: boolean // the bit type: long.
) → Long // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean, // the bit type: long.
start: long // the start type: long.
) → Long // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean, // the bit type: long.
start: long, // the start type: long.
end: long // the end type: long.
) → Long // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean // the bit type: long.
) → RedisFuture<Long> // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean, // the bit type: long.
start: long // the start type: long.
) → RedisFuture<Long> // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean, // the bit type: long.
start: long, // the start type: long.
end: long // the end type: long.
) → RedisFuture<Long> // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean // the bit type: long.
) → Mono<Long> // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean, // the bit type: long.
start: long // the start type: long.
) → Mono<Long> // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
bitpos(
key: K, // the key.
state: boolean, // the bit type: long.
start: long, // the start type: long.
end: long // the end type: long.
) → Mono<Long> // Long integer-reply The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the <em>start</em> argument <strong>only</strong>. However this behavior changes if you are looking for clear bits and specify a range with both <strong>start</strong> and <strong>end</strong>. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
BitPos(
ctx: context.Context,
key: string,
bit: int64,
pos: ...int64
) → *IntCmd
BitPosSpan(
ctx: context.Context,
key: string,
bit: int8,
start: Any,
end: int64,
span: string
) → *IntCmd
StringBitPosition(
key: RedisKey, // The key of the string.
bit: bool, // True to check for the first 1 bit, false to check for the first 0 bit.
start: long, // The position to start looking (defaults to 0).
end: long, // The position to stop looking (defaults to -1, unlimited).
flags: CommandFlags // The flags to use for this operation.
) → long // The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.
StringBitPosition(
key: RedisKey, // The key of the string.
bit: bool, // True to check for the first 1 bit, false to check for the first 0 bit.
start: long, // The position to start looking (defaults to 0).
end: long, // The position to stop looking (defaults to -1, unlimited).
indexType: StringIndexType, // In Redis 7+, we can choose if start and end specify a bit index or byte index (defaults to Byte).
flags: CommandFlags // The flags to use for this operation.
) → long // The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.
StringBitPositionAsync(
key: RedisKey,
bit: bool,
start: long,
end: long,
flags: CommandFlags
) → Task<long>
StringBitPositionAsync(
key: RedisKey,
bit: bool,
start: long,
end: long,
indexType: StringIndexType,
flags: CommandFlags
) → Task<long>
StringBitPosition(
key: RedisKey, // The key of the string.
bit: bool, // True to check for the first 1 bit, false to check for the first 0 bit.
start: long, // The position to start looking (defaults to 0).
end: long, // The position to stop looking (defaults to -1, unlimited).
flags: CommandFlags // The flags to use for this operation.
) → long // The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.
StringBitPositionAsync(
key: RedisKey,
bit: bool,
start: long,
end: long,
flags: CommandFlags
) → Task<long>
StringBitPositionAsync(
key: RedisKey,
bit: bool,
start: long,
end: long,
indexType: StringIndexType,
flags: CommandFlags
) → Task<long>
StringBitPosition(
key: RedisKey, // The key of the string.
bit: bool, // True to check for the first 1 bit, false to check for the first 0 bit.
start: long, // The position to start looking (defaults to 0).
end: long, // The position to stop looking (defaults to -1, unlimited).
flags: CommandFlags // The flags to use for this operation.
) → long // The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.
StringBitPosition(
key: RedisKey, // The key of the string.
bit: bool, // True to check for the first 1 bit, false to check for the first 0 bit.
start: long, // The position to start looking (defaults to 0).
end: long, // The position to stop looking (defaults to -1, unlimited).
indexType: StringIndexType, // In Redis 7+, we can choose if start and end specify a bit index or byte index (defaults to Byte).
flags: CommandFlags // The flags to use for this operation.
) → long // The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.
StringBitPosition(
key: RedisKey, // The key of the string.
bit: bool, // True to check for the first 1 bit, false to check for the first 0 bit.
start: long, // The position to start looking (defaults to 0).
end: long, // The position to stop looking (defaults to -1, unlimited).
flags: CommandFlags // The flags to use for this operation.
) → long // The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.
bitpos(
$key: string,
$bit: Any,
$start = null: Any,
$end = null: Any,
string $index = 'byte': Any
) → int
No method signature available for this client.
No method signature available for this client.