findAll static method
Implementation
static List<int> findAll(String haystack, String needle, {bool wholeWord = false}) {
final List<int> hits = <int>[];
if (needle.isEmpty) return hits;
int from = 0;
while (true) {
final int index = haystack.indexOf(needle, from);
if (index < 0) break;
if (!wholeWord || _isWordBoundary(haystack, index, needle.length)) hits.add(index);
from = index + 1;
}
return hits;
}