MCPcopy Create free account
hub / github.com/crownengine/crown / end_capture

Function end_capture

3rdparty/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.70

Calls 2

capture_to_closeFunction · 0.70
matchFunction · 0.70

Tested by

no test coverage detected