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

Function nospecials

lib/lua/src/lstrlib.c:746–754  ·  view source on GitHub ↗

check whether pattern has no special characters */

Source from the content-addressed store, hash-verified

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

Callers 1

str_find_auxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected