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

Function match_class

third-party/lua-5.3.5/src/lstrlib.c:282–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281
282static int match_class (int c, int cl) {
283 int res;
284 switch (tolower(cl)) {
285 case 'a' : res = isalpha(c); break;
286 case 'c' : res = iscntrl(c); break;
287 case 'd' : res = isdigit(c); break;
288 case 'g' : res = isgraph(c); break;
289 case 'l' : res = islower(c); break;
290 case 'p' : res = ispunct(c); break;
291 case 's' : res = isspace(c); break;
292 case 'u' : res = isupper(c); break;
293 case 'w' : res = isalnum(c); break;
294 case 'x' : res = isxdigit(c); break;
295 case 'z' : res = (c == 0); break; /* deprecated option */
296 default: return (cl == c);
297 }
298 return (islower(cl) ? res : !res);
299}
300
301
302static 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