MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / end_capture

Function end_capture

deps/lua/src/lstrlib.c:343–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341
342
343static const char *end_capture (MatchState *ms, const char *s,
344 const char *p) {
345 int l = capture_to_close(ms);
346 const char *res;
347 ms->capture[l].len = s - ms->capture[l].init; /* close capture */
348 if ((res = match(ms, s, p)) == NULL) /* match failed? */
349 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
350 return res;
351}
352
353
354static 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