Skip to main content

Convert a DataView to a string

还没翻译译自英文(bun.com)本页 3 段都还没译

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

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

See Binary Data.

译文 © 2026 fanyi.dev · 原文 © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)