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

Function cte_occurrences

tests/test_config_toml_edit.c:77–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static int cte_occurrences(const char *text, const char *needle) {
78 int count = 0;
79 size_t needle_len = strlen(needle);
80 const char *cursor = text;
81 while ((cursor = strstr(cursor, needle)) != NULL) {
82 ++count;
83 cursor += needle_len;
84 }
85 return count;
86}
87
88static size_t cte_temp_count(const char *dir) {
89 cbm_dir_t *directory = cbm_opendir(dir);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected