MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / match_capture

Function match_capture

lib/lua/src/lstrlib.c:559–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557
558
559static const char *match_capture (MatchState *ms, const char *s, int l) {
560 size_t len;
561 l = check_capture(ms, l);
562 len = ms->capture[l].len;
563 if ((size_t)(ms->src_end-s) >= len &&
564 memcmp(ms->capture[l].init, s, len) == 0)
565 return s+len;
566 else return NULL;
567}
568
569
570static 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