Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simple_utility/src/text.ts>utfDecode

Useful snippet collection.
Go to Latest
function utfDecode
import { utfDecode } from "https://deno.land/x/simple_utility@v1.3.7/src/text.ts";

Convert from UTF-8 binary to string.

Examples

Example 1

const text = "HelloWorld!";
const converted = utfEncode(text);
const restored = utfDecode(converted);

Parameters

data: Uint8Array

Returns

string