Files
bun.sh/docs/guides/binary/dataview-to-string.md
Colin McDonnell 4c89c60867 Add files (#3826)
2023-07-26 14:59:39 -07:00

552 B

name
name
Convert a Uint8Array to a string

If a DataView contains ASCII-encoded text, you can convert it to a string using the TextDecoder class.

const dv: DataView = ...;
const decoder = new TextDecoder();
const str = decoder.decode(dv);

See Docs > API > Binary Data for complete documentation on manipulating binary data with Bun.