strSubstrCount method
Implementation
int strSubstrCount(String search) {
return toLowerCase().split(search.toLowerCase()).length - 1;
// example:
// strSubstrCount('Hello World', 'o'); // returns 2
// strSubstrCount('Hello World', 'l'); // returns 3
}