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

Function cbm_path_base

src/foundation/str_util.c:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99const char *cbm_path_base(const char *path) {
100 if (!path) {
101 return "";
102 }
103 const char *last_slash = NULL;
104 for (const char *p = path; *p; p++) {
105 if (*p == '/') {
106 last_slash = p;
107 }
108 }
109 return last_slash ? last_slash + SKIP_ONE : path;
110}
111
112char *cbm_path_dir(CBMArena *a, const char *path) {
113 if (!path) {

Callers 1

test_str_util.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected