byteString

Converts a string to a byte array.

Type signature

(byteString: string) => number[]

Examples

from("PQR");
// ⇒ [80, 81, 82]
Try in REPL

Questions

  • How to convert a string into a byte array?

TypeScript sourceJavaScript source

Coverts a byte array into a string.

Type signature

(bytes: number[]) => string

Examples

to([0x50, 0x51, 0x52]);
// ⇒ "PQR"
Try in REPL

Questions

  • How to convert a byte array to string?

TypeScript sourceJavaScript source