Skip to main content

compare

Function compare 

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

Order two versions, or None if either is not a version this can read.

Dotted integers compared left to right, a missing segment reading as zero, a -suffix sorting before the same numbers without one, and +build ignored. The same rule usage_argv::warn implements, held to it by a parity test.