Version

Represents a version in semantic version format, or a branch identifier.

This can either have the form "~master", where "master" is a branch name, or the form "major.update.bugfix-prerelease+buildmetadata" (see the Semantic Versioning Specification v2.0.0 at http://semver.org/).

Constructors

this
this(string vers)

Constructs a new Version from its string representation.

Members

Functions

opCmp
int opCmp(ref const Version other)
int opCmp(in Version other)

Compares two versions/branches for precedence.

toString
string toString()

Returns the string representation of the version/branch.

Properties

isBranch
bool isBranch [@property getter]

Tests if this represents a branch instead of a version.

isMaster
bool isMaster [@property getter]

Tests if this represents the master branch "~master".

isPreRelease
bool isPreRelease [@property getter]

Tests if this represents a pre-release version.

isUnknown
bool isUnknown [@property getter]

Tests if this represents the special unknown version constant.

Static functions

fromString
Version fromString(string vers)

Constructs a new Version from its string representation.

Meta