from

fun from(version: String): Version

Parses the provided version in String format and returns a new Version representing a standard semantic versioning format.

Throws

If the provided version is empty or starts with any character that is not a digit. Valid formats must have at minimum a MAJOR number. MINOR and PATCH numbers separated by a '.' character are optional. Pre-release versions that add a suffix appended by a '-' character are optional and valid.


fun from(version: BigDecimal): Version

Parses the provided BigDecimal version by its String representation and returns a new Version representing a standard semantic versioning format.