Initializer

init(_:_:_:prereleaseIdentifiers:buildMetadataIdentifiers:)

Initializes and returns a newly allocated version struct for the provided components of a semantic version.

Declaration

init(_ major: Int, _ minor: Int, _ patch: Int, prereleaseIdentifiers: [String] = [], buildMetadataIdentifiers: [String] = [])

Parameters

major

The major version numner.

minor

The minor version number.

patch

The patch version number.

prereleaseIdentifiers

The pre-release identifier.

buildMetaDataIdentifiers

Build metadata that identifies a build.

See Also

Creating a Version

init(Version)

Initializes and returns a newly allocated version struct for the provided version.

init?(String)

Initializes and returns a newly allocated version struct for the provided version string.

init(extendedGraphemeClusterLiteral: String)

Initializes and returns a newly allocated version struct for the provided extended grapheme cluster.

init(stringLiteral: String)

Initializes and returns a newly allocated version struct for the provided string literal.

init(unicodeScalarLiteral: String)

Initializes and returns a newly allocated version struct for the provided Unicode string.