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

Function cbm_classify_string

internal/cbm/helpers.c:1611–1627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1609}
1610
1611int cbm_classify_string(const char *str, int len) {
1612 if (!str || len < PAIR_LEN) {
1613 return NOT_FOUND;
1614 }
1615
1616 if (is_url_like(str, len)) {
1617 return CBM_STRREF_URL;
1618 }
1619 if (has_config_extension(str, len)) {
1620 return CBM_STRREF_CONFIG;
1621 }
1622 if (is_env_var_pattern(str, len)) {
1623 return CBM_STRREF_CONFIG;
1624 }
1625
1626 return NOT_FOUND;
1627}
1628
1629/* Flatten a JS/TS `template_string` node into plain text (issue #1006).
1630 * String fragments are kept verbatim; each ${...} substitution becomes the

Callers 2

handle_string_refsFunction · 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