25 std::vector<int> versionComponents;
26 auto it = versionString.begin();
27 auto end = versionString.end();
28 const char* end_char = versionString.data() + versionString.size();
31 versionComponents.emplace_back( 0 );
34 auto result = std::from_chars( &( *it ), end_char, versionComponents.back() );
36 it += std::distance( &( *it ), result.ptr );
37 if( it != end && *it ==
'.' )
43 return versionComponents;
51 std::size_t len = std::min( ver1.size(), ver2.size() );
54 for(
size_t ii = 0; ii < len; ++ii )
56 if( ver1[ii] < ver2[ii] )
60 else if( ver1[ii] > ver2[ii] )
66 return ver1.size() >= ver2.size();
bool compareVersionStrings(const std::string &aVersionStr1, const std::string &aVersionStr2)
Compare two version strings of the form "major.minor.patch.build".
const std::vector< int > parseVersionString(const std::string &versionString)
Parse a version string into a vector of integers.