MCPcopy Create free account
hub / github.com/apache/arrow / ParseHH

Function ParseHH

cpp/src/arrow/util/value_parsing.h:467–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465
466template <typename Duration>
467static inline bool ParseHH(const char* s, Duration* out) {
468 uint8_t hours = 0;
469 if (ARROW_PREDICT_FALSE(!ParseUnsigned(s + 0, 2, &hours))) {
470 return false;
471 }
472 if (ARROW_PREDICT_FALSE(hours >= 24)) {
473 return false;
474 }
475 *out = std::chrono::duration_cast<Duration>(std::chrono::hours(hours));
476 return true;
477}
478
479template <typename Duration>
480static inline bool ParseHH_MM(const char* s, Duration* out) {

Callers 1

ParseTimestampISO8601Function · 0.85

Calls 1

ParseUnsignedFunction · 0.85

Tested by

no test coverage detected