MCPcopy Create free account
hub / github.com/apache/trafficserver / mime_parse_day

Function mime_parse_day

src/proxy/hdrs/MIME.cc:3523–3544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3521}
3522
3523bool
3524mime_parse_day(const char *&buf, const char *end, int *day)
3525{
3526 const char *e;
3527
3528 while ((buf != end) && *buf && !ParseRules::is_alpha(*buf)) {
3529 buf += 1;
3530 }
3531
3532 e = buf;
3533 while ((e != end) && *e && ParseRules::is_alpha(*e)) {
3534 e += 1;
3535 }
3536
3537 *day = day_names_dfa->match({buf, size_t(e - buf)});
3538 if (*day < 0) {
3539 return false;
3540 } else {
3541 buf = e;
3542 return true;
3543 }
3544}
3545
3546bool
3547mime_parse_month(const char *&buf, const char *end, int *month)

Callers 1

mime_parse_dateFunction · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected