MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / match_capture

Function match_capture

src/Chain/libraries/glua/lstrlib.cpp:425–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423
424
425static const char *match_capture(MatchState *ms, const char *s, int l) {
426 size_t len;
427 l = check_capture(ms, l);
428 len = ms->capture[l].len;
429 if ((size_t)(ms->src_end - s) >= len &&
430 memcmp(ms->capture[l].init, s, len) == 0)
431 return s + len;
432 else return nullptr;
433}
434
435
436static const char *match(MatchState *ms, const char *s, const char *p) {

Callers 1

matchFunction · 0.85

Calls 1

check_captureFunction · 0.85

Tested by

no test coverage detected