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

Method ParseVersionMinor

cpp/src/parquet/metadata.cc:1478–1501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1476 }
1477
1478 bool ParseVersionMinor() {
1479 auto version_minor_start = version_parsing_position_;
1480 auto version_minor_end =
1481 version_string_.find_first_not_of(digits_, version_minor_start);
1482 // MAJOR.MINOR only.
1483 if (version_minor_end == std::string::npos) {
1484 version_minor_end = version_string_.size();
1485 version_parsing_position_ = version_minor_end;
1486 } else {
1487 // No ".".
1488 if (version_string_[version_minor_end] != '.') {
1489 return false;
1490 }
1491 // No MINOR.
1492 if (version_minor_end == version_minor_start) {
1493 return false;
1494 }
1495 version_parsing_position_ = version_minor_end + 1; // +1 is for '.'.
1496 }
1497 auto version_minor_string = version_string_.substr(
1498 version_minor_start, version_minor_end - version_minor_start);
1499 application_version_.version.minor = atoi(version_minor_string.c_str());
1500 return true;
1501 }
1502
1503 bool ParseVersionPatch() {
1504 auto version_patch_start = version_parsing_position_;

Callers

nothing calls this directly

Calls 2

substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected