module Version:sig..end
val equal : string -> string -> booltrue iff the two strings define the same version. Hence,
the result may be true even when the two string differ
syntactically.val compare : string -> string -> intcompare x y returns 0 if x is eqivalent to y, -1 if x is smaller
than y, and 1 if x is greater than y. This is consistent with
Pervasives.compare.A version string that contains no dash (hence, no revision) is called native. Otherwise it is called non-native, in this case the revision may be empty (example: "1.2-") or not.
A suffix of the upstream part of a native version, or the suffix
of the revision part of a non-native version, may contain a part
indicating a binary NMU (Debian Developers Reference, section
5.10.2.1). A binary NMU part is of the form "+bN" where N is an
unsigned integer.
type version_analysis =
| |
Native of |
(* | epoch,upstream,binnmu | *) |
| |
NonNative of |
(* | epoch,upstream,revision,binnmu | *) |
val decompose : string -> version_analysisval compose : version_analysis -> stringequal(v,compose(decompose v)) = true. There may, however, be
small syntactic differences between v and compose(decompose v)val strip_epoch_binnmu : string -> stringval split : string -> string * string * string * stringdecompose should be used instead.val concat : string * string * string * string -> stringrecompose should be used instead.val normalize : string -> stringstrip_epoch_binnmu should be used instead.