getCountFindText static method
Implementation
static getCountFindText( text, String find) {
if (isNullOrEmpty(text)) return 0;
int count = 0;
int index = 0;
final findText = (text is String ? text : text.toString()).toLowerCase();
while ((index = findText.indexOf(find, index)) != -1) {
count++;
index += find.length;
}
return count;
}