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

x/simple_utility/src/pure/text.ts

Simplify processing for Deno.
Go to Latest
import * as simpleUtility from "https://deno.land/x/simple_utility@v2.0.9/src/pure/text.ts";

Functions

Accurately recognize string that contain character above 0x010000 and array them one by character. Useful for calculate number of characters with string contains emoji.

Clean up text with fixWidth() and trimExtend().

Convert half-width string (ex: Japanese Kana) to full-width and full-width alphanumeric symbols to half-width.

Convert from hex string to binary.

Convert from binary to hex string.

Create string with zero padding at beginning of number. Output is 2 digits by default.

Convert from any encoded binary to string. Default codec is SHIFT-JIS.

Trim head and tail blank, remove CR and consecutive space (tab, LF) to single space (tab, LF).

Convert from UTF-8 binary to string.

Convert from string to UTF-8 binary.