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

Function strip_ext

internal/cbm/helpers.c:278–290  ·  view source on GitHub ↗

Strip extension from basename

Source from the content-addressed store, hash-verified

276
277// Strip extension from basename
278static void strip_ext(const char *base, char *buf, size_t buflen) {
279 const char *dot = strrchr(base, '.');
280 if (dot && dot != base) {
281 size_t len = (size_t)(dot - base);
282 if (len >= buflen) {
283 len = buflen - SKIP_ONE;
284 }
285 memcpy(buf, base, len);
286 buf[len] = '\0';
287 } else {
288 snprintf(buf, buflen, "%s", base);
289 }
290}
291
292bool cbm_is_test_file(const char *rel_path, CBMLanguage lang) {
293 if (!rel_path) {

Callers 1

cbm_is_test_fileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected