MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / end_capture

Function end_capture

lib/lua/src/lstrlib.c:548–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546
547
548static const char *end_capture (MatchState *ms, const char *s,
549 const char *p) {
550 int l = capture_to_close(ms);
551 const char *res;
552 ms->capture[l].len = s - ms->capture[l].init; /* close capture */
553 if ((res = match(ms, s, p)) == NULL) /* match failed? */
554 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
555 return res;
556}
557
558
559static 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.85

Tested by

no test coverage detected