find static method

IndexValue? find(
  1. String s,
  2. List<String> arr
)

Implementation

static IndexValue? find(String s, List<String> arr) {
  for (int i = 0, j = arr.length; i < j; i++) {
    String v = arr[i];
    if (v.length < 1) {
      continue;
    }
    if (s.contains(v)) {
      return IndexValue(i, v);
    }
  }
  return null;
}