Expand description
Semantic version comparison utility.
CompareVersions parses two "major.minor.patch" strings and returns
-1, 0, or 1 following the same contract as C’s strcmp so callers
can use match on the result. Non-numeric segments are silently dropped.
Functions§
- Compare
Versions - Compare two semver strings.
Returns
1ifv1 > v2,-1ifv1 < v2,0if equal.