MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / count_substring

Function count_substring

tests/test_pipeline.c:5725–5732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5723}
5724
5725static int count_substring(const char *haystack, const char *needle) {
5726 int count = 0;
5727 size_t needle_len = strlen(needle);
5728 for (const char *at = strstr(haystack, needle); at; at = strstr(at + needle_len, needle)) {
5729 count++;
5730 }
5731 return count;
5732}
5733
5734static int count_nested_stage_entries(const char *dir_path, const char *db_basename) {
5735 cbm_dir_t *dir = cbm_opendir(dir_path);

Callers 2

test_pipeline.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected