Version numbering API. .
More...
|
class | Version |
| Compare version strings Simple class that allow comparing two version number. More...
|
|
|
std::vector< std::string > | explode (const std::string &version) |
| Explode a version string to an array of strings. More...
|
|
int | compare (const std::string &versionA, const std::string &versionB) |
| Compare version numbers. More...
|
|
std::string | extract (const std::string &version) |
| Extract version number from string. More...
|
|
int qi::version::compare |
( |
const std::string & |
versionA, |
|
|
const std::string & |
versionB |
|
) |
| |
Compare version numbers.
- Parameters
-
- Returns
- like strcmp, 0 if equal, -1 if a < b, 1 if a > b
std::vector<std::string> qi::version::explode |
( |
const std::string & |
version | ) |
|
Explode a version string to an array of strings.
- Parameters
-
version | The string to explode. |
- Returns
- An array of strings (including ".").
for example "1.2.3" become { "1", "2", "3" }
std::string qi::version::extract |
( |
const std::string & |
version | ) |
|
Extract version number from string.
- Parameters
-
version | The string containing the version number. |
- Returns
- The version number, if any.