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

Function strip_angle_brackets

internal/cbm/extract_imports.c:1152–1160  ·  view source on GitHub ↗

Strip angle brackets from a system include path ( → stdio.h).

Source from the content-addressed store, hash-verified

1150
1151// Strip angle brackets from a system include path (<stdio.h> → stdio.h).
1152static char *strip_angle_brackets(CBMArena *a, char *path) {
1153 if (path && path[0] == '<') {
1154 size_t len = strlen(path);
1155 if (len > SKIP_ONE && path[len - SKIP_ONE] == '>') {
1156 return cbm_arena_strndup(a, path + SKIP_ONE, len - PAIR_LEN);
1157 }
1158 }
1159 return path;
1160}
1161
1162/* Node kinds that only group file-level items: the branches of `#if` /
1163 * `#ifdef` (an include guard is one) and the body of `extern "C" { ... }`. */

Callers 1

parse_c_imports_inFunction · 0.85

Calls 1

cbm_arena_strndupFunction · 0.70

Tested by

no test coverage detected