Enumeration

ClosedRange.Index

A type that represents a position in the collection.

Declaration

@frozen enum Index
Available when Bound conforms to Strideable and Bound.Stride conforms to SignedInteger.

Overview

Valid indices consist of the position of every element and a “past the end” position that’s not valid for use as a subscript argument.

Topics

Instance Properties

var hashValue: Int

The hash value.

Instance Methods

func hash(into: inout Hasher)

Hashes the essential components of this value by feeding them into the given hasher.

Operator Functions

static func != (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Bool

Returns a Boolean value indicating whether two values are not equal.

static func ... (ClosedRange<Bound>.Index) -> PartialRangeFrom<ClosedRange<Bound>.Index>

Returns a partial range extending upward from a lower bound.

static func ... (ClosedRange<Bound>.Index) -> PartialRangeThrough<ClosedRange<Bound>.Index>

Returns a partial range up to, and including, its upper bound.

static func ..< (ClosedRange<Bound>.Index) -> PartialRangeUpTo<ClosedRange<Bound>.Index>

Returns a partial range up to, but not including, its upper bound.

static func ..< (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Range<ClosedRange<Bound>.Index>

Returns a half-open range that contains its lower bound but not its upper bound.

static func < (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Bool

Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.

static func <= (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Bool

Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.

static func == (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Bool

Returns a Boolean value indicating whether two values are equal.

static func > (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Bool

Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.

static func >= (ClosedRange<Bound>.Index, ClosedRange<Bound>.Index) -> Bool

Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.

See Also

Supporting Types

typealias ClosedRange.Element

A type representing the sequence’s elements.

typealias ClosedRange.Iterator

A type that provides the sequence’s iteration interface and encapsulates its iteration state.

typealias ClosedRange.SubSequence

A sequence that represents a contiguous subrange of the collection’s elements.