rune::library::filevercmp

Function verrevcmp

Source
fn verrevcmp(s1: &[u8], s2: &[u8]) -> i32
Expand description

slightly modified verrevcmp function from dpkg S1, S2 - compared char array

This implements the algorithm for comparison of version strings specified by Debian and now widely adopted. The detailed specification can be found in the Debian Policy Manual in the section on the ‘Version’ control field. This version of the code implements that from s5.6.12 of Debian Policy v3.8.0.1