isCaseInsensitiveContainsAny static method

bool isCaseInsensitiveContainsAny(
  1. String a,
  2. String b
)

Checks if a contains b or b contains a (Treating or interpreting upper- and lowercase letters as being the same).

Implementation

static bool isCaseInsensitiveContainsAny(String a, String b) {
  final lowA = a.toLowerCase();
  final lowB = b.toLowerCase();

  return lowA.contains(lowB) || lowB.contains(lowA);
}