Decodes a byte string to Uint8Array, with each character's charCode as a byte.
The byte string to decode.
Uint8Array.
If the input is not a string.
If string contains characters with charCode above 0xff.
1.0.0
const bytes = decodeByteString('Hello');console.log(bytes); // Uint8Array [72, 101, 108, 108, 111] Copy
const bytes = decodeByteString('Hello');console.log(bytes); // Uint8Array [72, 101, 108, 108, 111]
Decodes a byte string to Uint8Array, with each character's charCode as a byte.