util: add a vercmp function to compare version numbers

It is simple, supports simple x.y.z type numeric versions,
and does not attempt any kind of validation
This commit is contained in:
moneromooo-monero
2017-02-16 22:30:01 +00:00
parent e8a7525ceb
commit 08c3f38031
4 changed files with 63 additions and 1 deletions
+1
View File
@@ -183,4 +183,5 @@ namespace tools
unsigned get_max_concurrency();
bool is_local_address(const std::string &address);
int vercmp(const char *v0, const char *v1); // returns < 0, 0, > 0, similar to strcmp, but more human friendly than lexical - does not attempt to validate
}