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

Function nospecials

depends/lua/src/lstrlib.c:580–588  ·  view source on GitHub ↗

check whether pattern has no special characters */

Source from the content-addressed store, hash-verified

578
579/* check whether pattern has no special characters */
580static int nospecials (const char *p, size_t l) {
581 size_t upto = 0;
582 do {
583 if (strpbrk(p + upto, SPECIALS))
584 return 0; /* pattern has a special character */
585 upto += strlen(p + upto) + 1; /* may have more after \0 */
586 } while (upto <= l);
587 return 1; /* no special chars found */
588}
589
590
591static void prepstate (MatchState *ms, lua_State *L,

Callers 1

str_find_auxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected