Browse Source

Add string::Version::getMajor(), getMinor(), and getRevision().

tags/v2.4.1
Andrew Belt 1 year ago
parent
commit
bf43884b53
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      include/string.hpp

+ 10
- 0
include/string.hpp View File

@@ -118,6 +118,16 @@ struct Version {
operator std::string() const;
/** Returns whether this version is earlier than `other`. */
bool operator<(const Version& other);

std::string getMajor() const {
return get(parts, 0, "");
}
std::string getMinor() const {
return get(parts, 1, "");
}
std::string getRevision() const {
return get(parts, 2, "");
}
};




Loading…
Cancel
Save