removeDiacritics static method
Implementation
static String removeDiacritics({required String source}) {
var withDiacritics = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž';
var withoutDiacritics = 'AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz';
return source.splitMapJoin('',
onNonMatch: (char) =>
char.isNotEmpty && withDiacritics.contains(char) ? withoutDiacritics[withDiacritics.indexOf(char)] : char);
}