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

Function match_class

third-party/lua-5.1.5/src/lstrlib.c:226–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225
226static int match_class (int c, int cl) {
227 int res;
228 switch (tolower(cl)) {
229 case 'a' : res = isalpha(c); break;
230 case 'c' : res = iscntrl(c); break;
231 case 'd' : res = isdigit(c); break;
232 case 'l' : res = islower(c); break;
233 case 'p' : res = ispunct(c); break;
234 case 's' : res = isspace(c); break;
235 case 'u' : res = isupper(c); break;
236 case 'w' : res = isalnum(c); break;
237 case 'x' : res = isxdigit(c); break;
238 case 'z' : res = (c == 0); break;
239 default: return (cl == c);
240 }
241 return (islower(cl) ? res : !res);
242}
243
244
245static 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