fromString

fun fromString(versionString: String): SemVer

Initializes a new SemVer object from a string. The version must follow the Semantic Versioning (https://semver.org/): MAJOR.MINOR.PATCH.

Example:

  • 1.5.6

Author

Arnau Mora

Since

20220711

Parameters

versionString

The version string to parse.

Throws

When the format of the input string is not valid.

When a part of the version is not numeric.