matches method

bool matches(
  1. RegExp regex
)

Gets whether or not the current line matches the given pattern.

Implementation

bool matches(RegExp regex) {
  if (isDone) return false;
  return regex.hasMatch(current);
}