hasMatch method

bool hasMatch(
  1. String pattern, {
  2. bool multiLine = false,
  3. bool caseSensitive = true,
  4. bool unicode = false,
  5. bool dotAll = false,
})

Helper function to check for pattern matches.

Implementation

bool hasMatch(
  String pattern, {
  bool multiLine = false,
  bool caseSensitive = true,
  bool unicode = false,
  bool dotAll = false,
}) =>
    this != null &&
    RegExp(
      pattern,
      caseSensitive: caseSensitive,
      multiLine: multiLine,
      unicode: unicode,
      dotAll: dotAll,
    ).hasMatch(this!);