Skip to content

decodeStringKey(bytes, offset?): readonly [string, number]

Defined in: packages/key-encoding/src/scalars.ts:230

Decode one encodeStringKey encoding at offset, returning the string and the offset after its terminator.

Uint8Array

number

readonly [string, number]

INVALID_KEY_VALUE or INVALID_OFFSET, as decodeUint32Key.

TRUNCATED_KEY, INVALID_ESCAPE_SEQUENCE, or TRAILING_BYTES, as decodeBytesKey, or INVALID_UTF8 when the payload is not well-formed UTF-8.