contains static method
Determines if haystack contains any of the needles.
Implementation
static bool contains(
String haystack,
dynamic needles, {
bool ignoreCase = false,
}) {
final h = ignoreCase ? haystack.toLowerCase() : haystack;
final list = needles is List ? needles : [needles];
for (final n in list) {
final s = ignoreCase ? n.toString().toLowerCase() : n.toString();
if (s.isNotEmpty && h.contains(s)) return true;
}
return false;
}