normalizeName function

  1. @Deprecated('It will be removed in 2.0.0')
String normalizeName(
  1. String value
)

Transform value to uppercase and keeps only letters and digits.

Implementation

@Deprecated('It will be removed in 2.0.0')
String normalizeName(String value) {
  List<int> normal = [];
  for (int c in value.codeUnits) {
    if ((c >= _zero && c <= _nine) || (c >= _bigA && c <= _bigZ)) {
      normal.add(c);
    } else if (c >= _smallA && c <= _smallZ) {
      normal.add(c - _smallA + _bigA);
    }
  }
  return String.fromCharCodes(normal);
}