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
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
4 changed files with 63 additions and 1 deletions

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
}