isWhitespace property

bool isWhitespace

Whether the current character is whitespace.

In this case, whitespace refers to a non-escaped space character (ASCII 32).

You might also be interested in:

  • isEscaped, for checking if an arbitrary character is escaped;
  • current, for getting the current character.

Implementation

bool get isWhitespace => current == ' ' && !isEscaped(index);