removeAllNumbers method

String removeAllNumbers({
  1. List<String> include = const [],
})

Implementation

String removeAllNumbers({List<String> include = const []}) {
  final List<String> invalid = kNumbersString.toList()..addAll(include);
  final StringBuffer buffer = StringBuffer();
  for (int i = 0; i < length; i++) {
    final String character = this[i];
    if (!invalid.contains(character)) buffer.write(character);
  }
  return buffer.toString();
}