compareVersions
lib.strings.compareVersions
Primop
Docs pulled from | This Revision | about 1 hour ago
Takes 2 arguments
s1, s2
Compare two strings representing versions and return -1
if
version s1 is older than version s2, 0
if they are the same,
and 1
if s1 is newer than s2. The version comparison
algorithm is the same as the one used by nix-env -u
.
Noogle detected
Detected Type
compareVersions :: String -> String -> Int
Implementation
This function is implemented in c++ and is part of the native nix runtime.