|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
670 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Converts a string by replacing special characters and diacritical marks with their ASCII equivalents.
|
|---|
| 3 | * For example, "Crème brûlée" becomes "Creme brulee".
|
|---|
| 4 | *
|
|---|
| 5 | * @param {string} str - The input string to be deburred.
|
|---|
| 6 | * @returns {string} - The deburred string with special characters replaced by their ASCII equivalents.
|
|---|
| 7 | *
|
|---|
| 8 | * @example
|
|---|
| 9 | * // Basic usage:
|
|---|
| 10 | * deburr('Æthelred') // returns 'Aethelred'
|
|---|
| 11 | *
|
|---|
| 12 | * @example
|
|---|
| 13 | * // Handling diacritical marks:
|
|---|
| 14 | * deburr('München') // returns 'Munchen'
|
|---|
| 15 | *
|
|---|
| 16 | * @example
|
|---|
| 17 | * // Special characters:
|
|---|
| 18 | * deburr('Crème brûlée') // returns 'Creme brulee'
|
|---|
| 19 | */
|
|---|
| 20 | declare function deburr(str: string): string;
|
|---|
| 21 |
|
|---|
| 22 | export { deburr };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.