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

Function pl_trim

internal/cbm/doclink_perl.c:509–515  ·  view source on GitHub ↗

Trim t[*b, *e) and drop one pair of surrounding double quotes. */

Source from the content-addressed store, hash-verified

507
508/* Trim t[*b, *e) and drop one pair of surrounding double quotes. */
509static void pl_trim(const char *t, size_t *b, size_t *e, bool *quoted) {
510 size_t lo = pl_lead_spaces_end(t, *b, *e);
511 size_t hi = pl_trail_spaces_start(t, lo, *e);
512 *quoted = hi - lo >= PAIR_LEN && t[lo] == '"' && t[hi - SKIP_ONE] == '"';
513 *b = *quoted ? lo + SKIP_ONE : lo;
514 *e = *quoted ? hi - SKIP_ONE : hi;
515}
516
517/* `name(3)`: a man page. */
518static bool pl_is_man_page(const char *p) {

Callers 1

Calls 2

pl_lead_spaces_endFunction · 0.85
pl_trail_spaces_startFunction · 0.85

Tested by

no test coverage detected