Module filevercmp

Module filevercmp 

Source

Functionsยง

filevercmp ๐Ÿ”’
Compare strings A and B as file names containing version numbers, and return an integer that is negative, zero, or positive depending on whether A compares less than, equal to, or greater than B.
order ๐Ÿ”’
Return a version sort comparison value for Sโ€™s byte at position POS. If POS == LEN, sort before all non-โ€˜~โ€™ bytes.
prefix_len ๐Ÿ”’
Return the length of a prefix of S that corresponds to the suffix defined by this extended regular expression in the C locale: (.[A-Za-z~][A-Za-z0-9~])$ Use the longest suffix matching this regular expression, except do not use all of S as a suffix if S is nonempty. If *LEN is -1, S is a string; set *LEN to Sโ€™s length. Otherwise, *LEN should be nonnegative, S is a char array, and *LEN does not change.
verrevcmp ๐Ÿ”’
slightly modified verrevcmp function from dpkg S1, S2 - compared char array