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

Function match_capture

deps/lua/src/lstrlib.c:354–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352
353
354static const char *match_capture (MatchState *ms, const char *s, int l) {
355 size_t len;
356 l = check_capture(ms, l);
357 len = ms->capture[l].len;
358 if ((size_t)(ms->src_end-s) >= len &&
359 memcmp(ms->capture[l].init, s, len) == 0)
360 return s+len;
361 else return NULL;
362}
363
364
365static 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