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

Function cte_occurrences

tests/test_config_toml_edit.c:109–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected