Normalize String
Removes diacritics (accent marks) from characters to produce a normalized ASCII version of the string.
normalizeString
The normalizeString function removes diacritics (accent marks) from characters to produce a normalized ASCII-like version of the string.
Function Signature
function normalizeString(str: string): stringParameters
str(string): The input string containing diacritics.
Return Value
string: The normalized string.
Example Usage
playground.ts
Notes
- Uses Unicode Normalization Form D (NFD) to decompose characters.
- Diacritical marks in the range
\u0300to\u036fare stripped out.
Last updated: Sun, Jun 14, 2026 07:06:16AM (UTC)
