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

Function end_capture

extlibs/lua/src/lstrlib.c:545–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543
544
545static const char *end_capture (MatchState *ms, const char *s,
546 const char *p) {
547 int l = capture_to_close(ms);
548 const char *res;
549 ms->capture[l].len = s - ms->capture[l].init; /* close capture */
550 if ((res = match(ms, s, p)) == NULL) /* match failed? */
551 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
552 return res;
553}
554
555
556static const char *match_capture (MatchState *ms, const char *s, int l) {

Callers 1

matchFunction · 0.85

Calls 2

capture_to_closeFunction · 0.85
matchFunction · 0.70

Tested by

no test coverage detected