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

Function cbm_classify_string

internal/cbm/helpers.c:2307–2323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2305}
2306
2307int cbm_classify_string(const char *str, int len) {
2308 if (!str || len < PAIR_LEN) {
2309 return NOT_FOUND;
2310 }
2311
2312 if (is_url_like(str, len)) {
2313 return CBM_STRREF_URL;
2314 }
2315 if (has_config_extension(str, len)) {
2316 return CBM_STRREF_CONFIG;
2317 }
2318 if (is_env_var_pattern(str, len)) {
2319 return CBM_STRREF_CONFIG;
2320 }
2321
2322 return NOT_FOUND;
2323}
2324
2325/* Flatten a JS/TS `template_string` node into plain text (issue #1006).
2326 * String fragments are kept verbatim; each ${...} substitution becomes the

Callers 3

handle_string_refsFunction · 0.85
builder_route_urlFunction · 0.85
emit_yaml_leaf_valueFunction · 0.85

Calls 3

is_url_likeFunction · 0.85
has_config_extensionFunction · 0.85
is_env_var_patternFunction · 0.85

Tested by

no test coverage detected