I'm sorry for asking this, but is there any magically easy way to count the number of occourances of a substring in a string... for example,Except, it works?Code:3 == count ("abbabab", "ab");
I'm sorry for asking this, but is there any magically easy way to count the number of occourances of a substring in a string... for example,Except, it works?Code:3 == count ("abbabab", "ab");
Callou collei we'll code the way
Of prime numbers and pings!
I think the function you are after is in <string.h> or <cstring>
sorry, a little intoxicated
here is the prototype -
char* strstr( const char* s1, const char* s2 )