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

Function cs_trim

internal/cbm/doclink_cs.c:452–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452static void cs_trim(cs_str_t *t) {
453 size_t b = 0;
454 while (b < t->len && isspace((unsigned char)t->s[b])) {
455 b++;
456 }
457 if (b > 0) {
458 cs_cut(t, 0, b);
459 }
460 while (t->len > 0 && isspace((unsigned char)t->s[t->len - SKIP_ONE])) {
461 t->s[--t->len] = '\0';
462 }
463}
464
465/* Index just past the bracket group opened at s[i] (one of < { [ ( ),
466 * matching nested groups of any of those kinds; t->len when unbalanced. */

Callers 2

cs_drop_attributesFunction · 0.85
cbm_doclink_cs_norm_typeFunction · 0.85

Calls 1

cs_cutFunction · 0.85

Tested by

no test coverage detected