SemVer

Main struct

Constructors

this
this(size_t major, size_t minor, size_t patch, string prerelease = "", string build = "")

Create new SemVer

Members

Functions

nextMajor
SemVer nextMajor()
nextMinor
SemVer nextMinor()
nextPatch
SemVer nextPatch()

Next Major/Minor/Patch version Increments version in semver way

opCmp
int opCmp(ref const SemVer b)
int opCmp(in SemVer b)

Compares two SemVer structs.

opEquals
bool opEquals(auto ref const SemVer b)

true, if this == b

toString
string toString()

Convert SemVer to string

Examples

SemVer("1.0.0");
SemVer("1.0.0+4444");
SemVer("1.0.0-eyyyyup");
SemVer("1.0.0-yay+build");

Meta