intersects method

bool intersects(
  1. String? other
)

Checks the intersection between 2 strings.

Implementation

bool intersects(String? other) {
  if (this == null || other == null) return false;

  for (int i = 0; i < other.length; i++) {
    String s = other[i];
    if (this!.contains(s)) return true;
  }

  return false;
}