isWhitespace function

bool isWhitespace(
  1. int cc
)

Tests if the given code point (cc) is a white space.

Note: the definition of whitespaces is the same as String.trim, but a bit different than RegExp(r'\s'): it includes next line (i.e., NEL, 0x85).

Implementation

bool isWhitespace(int cc) => $whitespaces.contains(cc);