cmp compares parsed values and stringCmp compares version strings according to SemVer 2.0.0 precedence:
major, minor, and patch are compared numerically;
a prerelease has lower precedence than the corresponding stable release;
prerelease identifiers are compared from left to right;
numeric identifiers compare numerically and have lower precedence than alphanumeric identifiers;
when all shared identifiers are equal, the shorter prerelease has lower precedence;
build metadata and the optional parse date do not affect precedence.
dsc and stringDsc apply the exact reverse ordering. Parsing still preserves prerelease, build metadata, and date fields even when they do not affect comparison.
License
This package is dedicated to the public domain under CC0 1.0.