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

x/libauth/src/lib/format/utf8.ts

An ultra-lightweight, zero-dependency JavaScript library for Bitcoin Cash, Bitcoin, and Bitauth applications.
Latest
import * as libauth from "https://deno.land/x/libauth@v2.0.0-alpha.9/src/lib/format/utf8.ts";

Variables

Decode a Uint8Array as a UTF-8 string.

Return the user-perceived character length of the given string, e.g.:

Normalize a string using Unicode Normalization Form KC (NFKC): compatibility decomposition, followed by canonical composition. NFKC is the preferred form for applications in which disambiguation between characters is critical. In Libauth, all message formats designed for transmission between trust centers are NFKC-normalized to hinder exploits in which lookalike characters are used to deceive counterparties.

Return the user-perceived character segments of the given string, e.g.:

Interpret a string as UTF-8 and encode it as a Uint8Array.