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

Function php_is_url

internal/cbm/doclink_php.c:136–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134} php_emit_t;
135
136static bool php_is_url(const char *t, size_t n) {
137 size_t i = 0;
138 while (i < n && (isalnum((unsigned char)t[i]) || t[i] == '+' || t[i] == '.' || t[i] == '-')) {
139 i++;
140 }
141 if (i > 0 && i + CBM_SZ_3 <= n && memcmp(t + i, "://", CBM_SZ_3) == 0) {
142 return true;
143 }
144 return (n > CBM_SZ_4 && strncmp(t, "www.", CBM_SZ_4) == 0) ||
145 (n > CBM_SZ_7 && strncmp(t, "mailto:", CBM_SZ_7) == 0);
146}
147
148static void php_push(const php_emit_t *em, const char *ref, size_t n, uint32_t line) {
149 while (n > 0 && (ref[n - SKIP_ONE] == '.' || ref[n - SKIP_ONE] == ',' ||

Callers 1

php_pushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected