MCPcopy Create free account
hub / github.com/LAStools/LAStools / parseVersion

Function parseVersion

src/proj_loader.cpp:89–101  ·  view source on GitHub ↗

Function for parsing the version number from the directory name

Source from the content-addressed store, hash-verified

87
88/// Function for parsing the version number from the directory name
89static std::vector<int> parseVersion(std::string versionStr) {
90 std::vector<int> versionNumbers;
91 std::regex versionRegex("(\\d+)");
92 std::sregex_iterator it(versionStr.begin(), versionStr.end(), versionRegex);
93 std::sregex_iterator end;
94
95 while (it != end) {
96 versionNumbers.push_back(std::stoi(it->str()));
97 ++it;
98 }
99
100 return versionNumbers;
101}
102
103#if defined(__unix__) || defined(__APPLE__)
104/// Returns the path to the proj lib if lib exists, or optionally the path with the latest lib version in the directory

Callers 2

compareVersionsFunction · 0.85
checkProjMajorVersionFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected