MCPcopy Create free account
hub / github.com/DFHack/dfhack / end_capture

Function end_capture

depends/lua/src/lstrlib.c:403–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401
402
403static const char *end_capture (MatchState *ms, const char *s,
404 const char *p) {
405 int l = capture_to_close(ms);
406 const char *res;
407 ms->capture[l].len = s - ms->capture[l].init; /* close capture */
408 if ((res = match(ms, s, p)) == NULL) /* match failed? */
409 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
410 return res;
411}
412
413
414static 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