Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/simple_utility/src/pure/text.ts>u8Encode

Simplify processing for Deno.
Go to Latest
function u8Encode
import { u8Encode } from "https://deno.land/x/simple_utility@v2.0.9/src/pure/text.ts";

Convert from string to UTF-8 binary.

Examples

Example 1

const text = "HelloWorld!";
const encode = u8Encode(text);
const decode = u8Decode(encode);

Parameters

data: string

Returns

Uint8Array