Skip to main content

compare_versions

Function compare_versions 

Source
pub fn compare_versions(a: &str, b: &str) -> Option<Ordering>
Expand description

Orders two version strings the way Eagle’s version check does: an optional leading v, dot-separated numbers (missing ones count as 0), then an optional -prerelease that sorts before the release itself (its dot-separated parts compare as numbers when both are numeric, else as text, and fewer parts sort first). +build is ignored. None when either isn’t a version.