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

Function min_expand

depends/lua/src/lstrlib.c:376–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374
375
376static const char *min_expand (MatchState *ms, const char *s,
377 const char *p, const char *ep) {
378 for (;;) {
379 const char *res = match(ms, s, ep+1);
380 if (res != NULL)
381 return res;
382 else if (singlematch(ms, s, p, ep))
383 s++; /* try with one more repetition */
384 else return NULL;
385 }
386}
387
388
389static const char *start_capture (MatchState *ms, const char *s,

Callers 1

matchFunction · 0.85

Calls 2

singlematchFunction · 0.85
matchFunction · 0.70

Tested by

no test coverage detected