init(unicodeScalarLiteral:)
Initializes a version struct with the provided Unicode string.
init(unicodeScalarLiteral value: String)
Parameters
- version
A Unicode string to use for creating a new version struct.
Initializes a version struct with the provided Unicode string.
init(unicodeScalarLiteral value: String)
s18PackageDescription7VersionV20unicodeScalarLiteralACSS_tcfc
What are these?5C45W
A Unicode string to use for creating a new version struct.
import PackageDescription
Create reusable code, organize it in a lightweight way, and share it across your projects and with other developers.
struct Version
A version according to the semantic versioning specification.
@frozen struct String
A Unicode string value that is a collection of characters.
init?(_ versionString: String)
Initializes a version struct with the provided version string.
init(_ major: Int, _ minor: Int, _ patch: Int, prereleaseIdentifiers: [String] = [], buildMetadataIdentifiers: [String] = [])
Initializes a version struct with the provided components of a semantic version.
init(extendedGraphemeClusterLiteral value: String)
Initializes a version struct with the provided extended grapheme cluster.
init(stringLiteral value: String)
Initializes a version struct with the provided string literal.
let buildMetadataIdentifiers: [String]
The build metadata of this version according to the semantic versioning standard, such as a commit hash.
var description: String { get }
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
.
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.