matchAsPrefix static method

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

Refer to String.matchAsPrefix

If string is null then it is treated as an empty String

Implementation

static Match? matchAsPrefix(
  String? pattern,
  String string, [
  int start = 0,
]) => (pattern ?? '').matchAsPrefix(string, start);