convertAccent function

String convertAccent(
  1. String text
)

Implementation

String convertAccent(String text) {
  String result = '';
  for (int i = 0; i < text.length; i++) {
    final int index = source.indexOf(text[i]);
    if (index != -1) {
      result += destination[index];
    } else {
      result += text[i];
    }
  }
  return result;
}