MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / singlematch

Function singlematch

Source/Misc/lua/src/lua.c:13945–13952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13943
13944
13945static int singlematch (int c, const char *p, const char *ep) {
13946switch (*p) {
13947case '.': return 1; /* matches any char */
13948case L_ESC: return match_class(c, uchar(*(p+1)));
13949case '[': return matchbracketclass(c, p, ep-1);
13950default: return (uchar(*p) == c);
13951}
13952}
13953
13954
13955static const char *match (MatchState *ms, const char *s, const char *p);

Callers 3

max_expandFunction · 0.85
min_expandFunction · 0.85
matchFunction · 0.85

Calls 2

match_classFunction · 0.85
matchbracketclassFunction · 0.85

Tested by

no test coverage detected