bytesToString

Converts an array of bytes to a string using UTF-8 encoding.

Example

import { bytesToString } from "thirdweb/utils";
const bytes = new Uint8Array([72, 101, 108, 108, 111]);
const string = bytesToString(bytes);
console.log(string); // "Hello"

Parameters

Returns

The resulting string.