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

x/value_schema/dist-deno/libs/string.ts>toHalfWidth

simple, easy-to-use, and declarative input validator; supports Node.js, TypeScript, Deno, and Bun
Go to Latest
function toHalfWidth
import { toHalfWidth } from "https://deno.land/x/value_schema@v4.0.0-rc.2/dist-deno/libs/string.ts";

convert full-width to half-width in str

Parameters

str: string

string to convert

charsets: string | RegExp

character sets to convert

Returns

string

half-width string