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

Function cte_occurrences

tests/test_config_toml_edit.c:111–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111static int cte_occurrences(const char *text, const char *needle) {
112 int count = 0;
113 size_t needle_len = strlen(needle);
114 const char *cursor = text;
115 while ((cursor = strstr(cursor, needle)) != NULL) {
116 ++count;
117 cursor += needle_len;
118 }
119 return count;
120}
121
122static int cte_replace_once(const char *source, const char *needle, const char *replacement,
123 char *output, size_t output_size) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected