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

Function cs_drop_modifiers

internal/cbm/doclink_cs.c:545–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543}
544
545static void cs_drop_modifiers(cs_str_t *t) {
546 static const char *const mods[] = {"ref", "out", "in", "params",
547 "this", "scoped", "readonly", "final"};
548 for (size_t i = 0; i < t->len;) {
549 bool cut = false;
550 for (size_t m = 0; m < sizeof(mods) / sizeof(mods[0]); m++) {
551 if (cs_word_at(t, i, mods[m])) {
552 size_t e = i + strlen(mods[m]);
553 while (e < t->len && isspace((unsigned char)t->s[e])) {
554 e++;
555 }
556 cs_cut(t, i, e);
557 cut = true;
558 break;
559 }
560 }
561 if (!cut) {
562 i++;
563 }
564 }
565}
566
567/* Doc-ID arity markers: `1, ``0. */
568static void cs_drop_backtick_arity(cs_str_t *t) {

Callers 1

cbm_doclink_cs_norm_typeFunction · 0.85

Calls 2

cs_word_atFunction · 0.85
cs_cutFunction · 0.85

Tested by

no test coverage detected