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

Function MatchFixedOffset

python/pyarrow/src/arrow/python/datetime.cc:46–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44namespace {
45
46bool MatchFixedOffset(const std::string& tz, std::string_view* sign,
47 std::string_view* hour, std::string_view* minute) {
48 static const std::regex regex("^([+-])(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])$");
49 if (tz.size() < 5) {
50 return false;
51 }
52 return RegexMatch(regex, tz, {sign, hour, minute});
53}
54
55constexpr char* NonConst(const char* st) {
56 // Hack for python versions < 3.7 where members of PyStruct members

Callers 1

StringToTzinfoFunction · 0.85

Calls 2

RegexMatchFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected