Count occurrences of a substring: Difference between revisions
Content added Content deleted
Line 41: | Line 41: | ||
#include <string.h> |
#include <string.h> |
||
int match(char *s, char *p, int overlap) |
int match(const char *s, const char *p, int overlap) |
||
{ |
{ |
||
int c = 0, l = strlen(p); |
int c = 0, l = strlen(p); |