common_util
|
Version utilities. More...
#include <string>
Go to the source code of this file.
Functions | |
bool | cutl::is_version (const std::string &text) |
Check if a string is a valid version. | |
std::string | cutl::get_version (const std::string &text) |
Parse a version string from a text. | |
int | cutl::compare_version (const std::string &v1, const std::string &v2) |
Compare two version strings. | |
Version utilities.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations.
int cutl::compare_version | ( | const std::string & | v1, |
const std::string & | v2 ) |
Compare two version strings.
v1 | version string 1. |
v2 | version string 2. |
std::string cutl::get_version | ( | const std::string & | text | ) |
Parse a version string from a text.
text | The text to parse. |
bool cutl::is_version | ( | const std::string & | text | ) |
Check if a string is a valid version.
text | The string to check. |