bytesPrefixEnd(
prefix):Uint8Array<ArrayBufferLike> |undefined
Defined in: packages/key-encoding/src/bytes.ts:56
The smallest byte string greater than every key that starts with prefix, the exclusive upper bound of a prefix
range scan: a key starts with prefix exactly when prefix <= key < bytesPrefixEnd(prefix).
Drops trailing 0xff bytes and increments the last remaining byte, returning a new array. Returns undefined when
prefix is empty or every byte is 0xff, because then no finite bound exists and the scan runs to the end.
Parameters
Section titled “Parameters”prefix
Section titled “prefix”Uint8Array
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike> | undefined
Throws
Section titled “Throws”INVALID_KEY_VALUE when prefix is not a Uint8Array.