#include <stdio.h>
#include <string.h>
int count_occurrences(char *text, char *waifu) {
int count = 0;
int text_length = strlen(text);
int waifu_length = strlen(waifu);
for (int i = 0; i < text_length; i++) {
for (int j = 0; j < waifu_length; j++) {
if (text[i + j] != waifu[j] || (i + j >= text_length)) {
break;
}
if (j == waifu_length - 1) {
count++;
}
Comment too long. Click here to view the full text.