18 lines
316 B
C
18 lines
316 B
C
#ifndef STR_H
|
|
#define STR_H
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
|
|
uint count_word_occurences(char * content, char *word){
|
|
uint count = 0;
|
|
char * found = NULL;
|
|
while((found = strstr(content,word)) != NULL){
|
|
count++;
|
|
content = found;
|
|
content++;
|
|
}
|
|
return count;
|
|
}
|
|
|
|
#endif
|