to Constraint
Parses the string as a Constraint and returns the result or throws a ConstraintFormatException if the string is not a valid representation of a constraint.
Samples
import io.github.z4kn4fein.semver.constraints.Constraint
import io.github.z4kn4fein.semver.constraints.ConstraintSerializer
import io.github.z4kn4fein.semver.constraints.satisfiedBy
import io.github.z4kn4fein.semver.constraints.satisfiedByAll
import io.github.z4kn4fein.semver.constraints.satisfiedByAny
import io.github.z4kn4fein.semver.constraints.toConstraint
import io.github.z4kn4fein.semver.constraints.toConstraintOrNull
import io.github.z4kn4fein.semver.toVersion
import kotlinx.serialization.json.Json
fun main() {
//sampleStart
print(">=1.0".toConstraint())
//sampleEnd
}