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

Function py_quoted_value

internal/cbm/doclink_py.c:273–287  ·  view source on GitHub ↗

["']([^"']+)["'] at s[i]: the value span, or false. */

Source from the content-addressed store, hash-verified

271
272/* ["']([^"']+)["'] at s[i]: the value span, or false. */
273static bool py_quoted_value(const char *s, size_t n, size_t i, size_t *va, size_t *vb) {
274 if (i >= n || (s[i] != '"' && s[i] != '\'')) {
275 return false;
276 }
277 size_t j = i + 1;
278 while (j < n && s[j] != '"' && s[j] != '\'') {
279 j++;
280 }
281 if (j == i + 1 || j >= n) {
282 return false;
283 }
284 *va = i + 1;
285 *vb = j;
286 return true;
287}
288
289/* /(blob|tree)/[^/]+/%s in the URL: a repository path pattern. */
290static bool py_repo_url(const char *u, size_t n) {

Callers 1

py_confFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected