matchAsPrefix method Null safety

  1. @override
Match? matchAsPrefix(
  1. String string,
  2. [int start = 0]
)
override

Matches this pattern against the start of string.

Returns a match if the pattern matches a substring of string starting at start, and null if the pattern doesn't match a that point.

The start must be non-negative and no greater than string.length.

Implementation

@override
Match? matchAsPrefix(String string, [int start = 0]) {
  return value!.matchAsPrefix(string, start);
}