isWhitespace function

bool isWhitespace(
  1. int x
)

Ordinary whitespace (not line terminators)

Implementation

bool isWhitespace(int x) {
  switch (x) {
    case char.SPACE:
    case char.TAB:
    case char.VTAB:
    case char.FF:
    case char.BOM:
      return true;

    default:
      return x > 127 && unicode.isSpaceSeparator(x);
  }
}