MCPcopy Create free account
hub / github.com/bytedance/bolt / findFirstPlusOrMinus

Function findFirstPlusOrMinus

bolt/type/TimestampConversion.cpp:1006–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004 if (pos1 > pos2 || pos2 >= str.size()) {
1005 return false;
1006 }
1007 std::string_view sub = str.substr(pos1, pos2 - pos1);
1008 return targets.find(sub) != targets.end();
1009}
1010
1011std::optional<std::pair<Timestamp, int16_t>> fromTimestampWithTimezoneString(
1012 const char* str,
1013 size_t len) {
1014 size_t pos;
1015 Timestamp resultTimestamp;
1016
1017 if (!tryParseTimestampString(str, len, pos, resultTimestamp)) {
1018 return std::nullopt;
1019 }

Callers 1

Calls 2

minFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected