KiCad PCB EDA Suite
Loading...
Searching...
No Matches
version_compare.cpp File Reference
#include <charconv>
#include <core/version_compare.h>

Go to the source code of this file.

Functions

const std::vector< int > parseVersionString (const std::string &versionString)
 Parse a version string into a vector of integers.
 
bool compareVersionStrings (const std::string &aVersionStr1, const std::string &aVersionStr2)
 Compare two version strings of the form "major.minor.patch.build".
 

Function Documentation

◆ compareVersionStrings()

bool compareVersionStrings ( const std::string &  aVersionStr1,
const std::string &  aVersionStr2 
)

Compare two version strings of the form "major.minor.patch.build".

Parameters
aVersionStr1The first version string
aVersionStr2The second version string
Returns
true if aVersionStr1 <= aVersionStr2, false otherwise

Definition at line 47 of file version_compare.cpp.

References parseVersionString().

◆ parseVersionString()

const std::vector< int > parseVersionString ( const std::string &  versionString)

Parse a version string into a vector of integers.

Parameters
versionStringThe version string to parse
Returns
A vector of integers representing the version

Definition at line 23 of file version_compare.cpp.

Referenced by compareVersionStrings().