SemanticVersioningKit Documentation Beta

Structure Semantic​Version

public struct SemanticVersion
%3 SemanticVersion SemanticVersion Comparable Comparable SemanticVersion->Comparable CustomStringConvertible CustomStringConvertible SemanticVersion->CustomStringConvertible

Conforms To

Comparable
CustomStringConvertible

Initializers

init?(data:​)

public init?(data: String)

Initialize a new SemanticVersion with a String representation

If the data does not represent a Semantic Versioning conforming String the initialization fails and nil is returned.

Parameters

data String

String to parse

init(major:​minor:​patch:​pre​Release​Identifiers:​build​Identifiers:​)

public init(major: Int, minor: Int, patch: Int, preReleaseIdentifiers: [String] = [], buildIdentifiers: [String] = [])

Initialize a new Semantic Version

Parameters

major Int

Major version

minor Int

Minor version

patch Int

Patch version

pre​Release​Identifiers [String]

Array of pre release identifiers

build​Identifiers [String]

Array of build identifiers

Properties

pre​Release​Identifiers

let preReleaseIdentifiers: [String]

build​Identifiers

let buildIdentifiers: [String]

major

var major: Int

minor

var minor: Int

patch

var patch: Int

description

var description: String

Methods

==(lhs:​rhs:​)

public static func ==(lhs: SemanticVersion, rhs: SemanticVersion) -> Bool

<(lhs:​rhs:​)

public static func <(lhs: SemanticVersion, rhs: SemanticVersion) -> Bool