matches method

bool matches(
  1. Pattern expression
)

Determines if this String matches the given pattern.

Implementation

bool matches(Pattern expression) {
  final match = expression.matchAsPrefix(this);
  return match != null && match.start == 0 && match.end == length;
}