Normalizer

An extension to normalize strings(removes accents and diacritics) Hecho en 🇵🇷 por Radamés J. Valentín Reyes

Import

import 'package:normalizer/normalizer.dart';

Example

Example 1:

String testString = "ñame, energía";
print(testString.normalize());

Example 2:

print("ñame" == "name");//false
print("ñame".normalize() == "name");//true

Uses

  • In a search algorithm you can normalize strings before you compare them in order to get more matches when letters are similar(without diacritical symbols). Always remember to normalize both the search query and the i

Remaining work and work done

If it has a ✔️ it should able to replace all or most characters that have such type of diacritical symbols

✔️ ACUTE ACCENT ✔️ UMLAUT ✔️ GRAVE ACCENT ✔️ MACRON ✔️ CIRCUMFLEX ✔️ CEDILLA ✔️ TILDE ❌ STREG ❌ BOLLE ❌ CARON ❌ BREVE


Contribute/donate by tapping on the Pay Pal logo/image


References

Libraries

normalizer