mirror of https://git.sr.ht/~hrbrmstr/vershist
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
864 B
23 lines
864 B
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/utils.R
|
|
\name{complete_semver}
|
|
\alias{complete_semver}
|
|
\title{Turn partial "valid" semantic version strings into a complete semver-tri or quad strings}
|
|
\usage{
|
|
complete_semver(x, quad = FALSE)
|
|
}
|
|
\arguments{
|
|
\item{x}{a character vector of full or partial version strings}
|
|
|
|
\item{quad}{(logical) if `TRUE` then a three-dot semver is returned, else a two-dot semver
|
|
is returned. Default: `FALSE`.}
|
|
}
|
|
\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`.
|
|
}
|
|
\details{
|
|
Partial validity checking is performed to test if the input strings contain only
|
|
digits and periods. "Invalid" input is returned unscathed.
|
|
}
|
|
|