normalizeDigits static method
Implementation
static StringBuffer normalizeDigits(String number, bool keepNonDigits) {
StringBuffer normalizedDigits = StringBuffer();
for (int i = 0; i < number.length; i++) {
final String c = number[i];
final int? digit = characterToDigit(c);
if (digit != null) {
normalizedDigits.write(digit);
} else if (keepNonDigits) {
normalizedDigits.write(c);
}
}
return normalizedDigits;
}