MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / match_class

Function match_class

third-party/lua-5.5.0/src/lstrlib.c:429–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427
428
429static int match_class (int c, int cl) {
430 int res;
431 switch (tolower(cl)) {
432 case 'a' : res = isalpha(c); break;
433 case 'c' : res = iscntrl(c); break;
434 case 'd' : res = isdigit(c); break;
435 case 'g' : res = isgraph(c); break;
436 case 'l' : res = islower(c); break;
437 case 'p' : res = ispunct(c); break;
438 case 's' : res = isspace(c); break;
439 case 'u' : res = isupper(c); break;
440 case 'w' : res = isalnum(c); break;
441 case 'x' : res = isxdigit(c); break;
442 case 'z' : res = (c == 0); break; /* deprecated option */
443 default: return (cl == c);
444 }
445 return (islower(cl) ? res : !res);
446}
447
448
449static int matchbracketclass (int c, const char *p, const char *ec) {

Callers 2

matchbracketclassFunction · 0.70
singlematchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected