hasMatch function

bool hasMatch(
  1. String? s,
  2. String p
)

Checks if a string matches a specified pattern.

This function returns true if the s string matches the specified regular expression pattern p. If the s string is null, it returns false.

Implementation

bool hasMatch(String? s, String p) =>
    (s == null) ? false : RegExp(p).hasMatch(s);