MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / match_capture

Function match_capture

extlibs/lua/src/lstrlib.c:556–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554
555
556static const char *match_capture (MatchState *ms, const char *s, int l) {
557 size_t len;
558 l = check_capture(ms, l);
559 len = ms->capture[l].len;
560 if ((size_t)(ms->src_end-s) >= len &&
561 memcmp(ms->capture[l].init, s, len) == 0)
562 return s+len;
563 else return NULL;
564}
565
566
567static 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