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

Function match_capture

depends/lua/src/lstrlib.c:414–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413
414static const char *match_capture (MatchState *ms, const char *s, int l) {
415 size_t len;
416 l = check_capture(ms, l);
417 len = ms->capture[l].len;
418 if ((size_t)(ms->src_end-s) >= len &&
419 memcmp(ms->capture[l].init, s, len) == 0)
420 return s+len;
421 else return NULL;
422}
423
424
425static const char *match (MatchState *ms, const char *s, const char *p) {

Callers 1

matchFunction · 0.85

Calls 1

check_captureFunction · 0.85

Tested by

no test coverage detected