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

Function strip_ext

internal/cbm/helpers.c:382–394  ·  view source on GitHub ↗

Strip extension from basename

Source from the content-addressed store, hash-verified

380
381// Strip extension from basename
382static void strip_ext(const char *base, char *buf, size_t buflen) {
383 const char *dot = strrchr(base, '.');
384 if (dot && dot != base) {
385 size_t len = (size_t)(dot - base);
386 if (len >= buflen) {
387 len = buflen - SKIP_ONE;
388 }
389 memcpy(buf, base, len);
390 buf[len] = '\0';
391 } else {
392 snprintf(buf, buflen, "%s", base);
393 }
394}
395
396bool cbm_is_test_file(const char *rel_path, CBMLanguage lang) {
397 if (!rel_path) {

Callers 1

cbm_is_test_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected