eatCharacter method

bool eatCharacter(
  1. String char
)

Attempts to consume a single char from the current position.

Returns true if the character was found and consumed, false otherwise.

Implementation

bool eatCharacter(String char) {
  return eat((c, _) => c == char, 1) != null;
}