isAsciiChar static method

bool isAsciiChar(
  1. String ch
)

Implementation

static bool isAsciiChar(String ch) {
  if (ch.length != 1) {
    return false;
  } else {
    final int codeUnit = ch.codeUnitAt(0);
    return codeUnit >= 32 && codeUnit <= 126;
  }
}