Parse and compare generic version strings.
Does not assume any versioning scheme such as Semantic Versioning, but simply interprets sequences of digits and sequences of letters as parts, ignoring punctuation and whitespace.
Compares parts lexicographically, filling shorter versions with nil
.
Types are compared as int > nil > string
. That means that 2.1.0
is
greater than 2.1
, and 2.1
is greater than 2.1-alpha2
.
Parse and compare generic version strings. Does not assume any versioning scheme such as Semantic Versioning, but simply interprets sequences of digits and sequences of letters as parts, ignoring punctuation and whitespace. Compares parts lexicographically, filling shorter versions with `nil`. Types are compared as `int > nil > string`. That means that `2.1.0` is greater than `2.1`, and `2.1` is greater than `2.1-alpha2`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close