compare

fun compare(other: String): Int(source)
fun compare(other: SemVer): Int(source)

Compares two versions excluding build identifiers (the bit after + in the semantic version string).

Return

  • 0 if this == other

  • 1 if this is greater

  • -1 if other is greater.