Product Site

5.1.7.39. caselessCountStr

Returns a count of the occurrences of needle in the receiving string that do not overlap. All matches are made using caseless comparisons.

Here are some examples:
Example 5.79. String class — caselessCountStr method
Say "a0Aa0A"~caselessCountStr("a")        -->    4
Say "J0kKk0"~caselessCountStr("KK")       -->    1