complete_semver: Turn partial "valid" semantic version strings into a complete...

Description Usage Arguments Details

View source: R/utils.R

Description

For MAJOR.MINOR.PATCH (semver-tri), turn '1' into '1.0.0'; '1.1' into '1.1.0'; '1.1.1' into '1.1.1'. For MAJOR.MINOR.PATCH.EXTENSION (semver-quad), turn '1' into '1.0.0.0'; '1.1' into '1.1.0.0'; '1.1.1.0' into '1.1.1.0'.

Usage

1

Arguments

x

a character vector of full or partial version strings

quad

(logical) if 'TRUE' then a three-dot semver is returned, else a two-dot semver is returned. Default: 'FALSE'.

Details

Partial validity checking is performed to test if the input strings contain only digits and periods. "Invalid" input is returned unscathed.


hrbrmstr/vershist documentation built on Feb. 3, 2020, 12:10 a.m.