init(stringLiteral:)
Initializes a version struct with the provided string literal.
Version+StringLiteralConvertible.swift:17init(stringLiteral value: String)
Parameters
- version
A string literal to use for creating a new version struct.
Other members in extension
Type members
init?(String
) Initializes a version struct with the provided version string.
init(Int, Int, Int, prereleaseIdentifiers: [String], buildMetadataIdentifiers: [String]
) Initializes a version struct with the provided components of a semantic version.
init(extendedGraphemeClusterLiteral: String
) Initializes a version struct with the provided extended grapheme cluster.
init(unicodeScalarLiteral: String
) Initializes a version struct with the provided Unicode string.
static func < (lhs: Version, rhs: Version
) -> Bool Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.
static func == (lhs: Version, rhs: Version
) -> Bool Returns a Boolean value indicating whether two values are equal.
Instance members
let buildMetadataIdentifiers: [String]
The build metadata of this version according to the semantic versioning standard, such as a commit hash.
var description: String
A textual description of the version object.
let major: Int
The major version according to the semantic versioning standard.
let minor: Int
The minor version according to the semantic versioning standard.
let patch: Int
The patch version according to the semantic versioning standard.
let prereleaseIdentifiers: [String]
The pre-release identifier according to the semantic versioning standard, such as
-beta.1
.