I am trying to find the count of the substring in a big string of length 10000 characters. Finally I need to remove all the substring in it.
example s = abacacac, subs
Just remove all the substring, then check the difference on string length before and after removal. Divide the temp string with number of characters from the substring gives you the occurrences.