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

x/simple_utility/mod.ts>u8Encode

Useful snippet collection.
Go to Latest
function u8Encode
Re-export
import { u8Encode } from "https://deno.land/x/simple_utility@v1.5.2/mod.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