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

Function regex_parse_digits

src/foundation/compat_regex.c:110–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static bool regex_parse_digits(const char *p, size_t *i, uint64_t *value) {
111 bool any = false;
112 *value = 0;
113 while (p[*i] >= '0' && p[*i] <= '9') {
114 *value = regex_sat_add(regex_sat_mul(*value, 10), (uint64_t)(p[*i] - '0'));
115 (*i)++;
116 any = true;
117 }
118 return any;
119}
120
121/* Parse the interval body that starts at p[i], just past the opening brace
122 * (`{` in extended syntax, `\{` in basic). On success stores the number of

Callers 1

regex_parse_intervalFunction · 0.85

Calls 2

regex_sat_addFunction · 0.85
regex_sat_mulFunction · 0.85

Tested by

no test coverage detected