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

Function cbm_path_join_n

src/foundation/str_util.c:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60char *cbm_path_join_n(CBMArena *a, const char **parts, int n) {
61 if (n <= 0 || !parts) {
62 return cbm_arena_strdup(a, "");
63 }
64 if (n == SKIP_ONE) {
65 return cbm_arena_strdup(a, parts[0]);
66 }
67
68 char *result = cbm_arena_strdup(a, parts[0]);
69 for (int i = SKIP_ONE; i < n; i++) {
70 result = cbm_path_join(a, result, parts[i]);
71 }
72 return result;
73}
74
75const char *cbm_path_ext(const char *path) {
76 if (!path) {

Callers 1

test_str_util.cFile · 0.85

Calls 2

cbm_path_joinFunction · 0.85
cbm_arena_strdupFunction · 0.70

Tested by

no test coverage detected