MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / nospecials

Function nospecials

extlibs/lua/src/lstrlib.c:743–751  ·  view source on GitHub ↗

check whether pattern has no special characters */

Source from the content-addressed store, hash-verified

741
742/* check whether pattern has no special characters */
743static int nospecials (const char *p, size_t l) {
744 size_t upto = 0;
745 do {
746 if (strpbrk(p + upto, SPECIALS))
747 return 0; /* pattern has a special character */
748 upto += strlen(p + upto) + 1; /* may have more after \0 */
749 } while (upto <= l);
750 return 1; /* no special chars found */
751}
752
753
754static void prepstate (MatchState *ms, lua_State *L,

Callers 1

str_find_auxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected