subscript(_:)
subscript(bounds: Range<ClosedRange<Bound>.Index>) -> Slice<ClosedRange<Bound>> { get }
subscript(bounds: Range<ClosedRange<Bound>.Index>) -> Slice<ClosedRange<Bound>> { get }
sSNsSxRzSZ6StrideRpzrlEys5SliceVySNyxGGSnySNsSxRzSZABRQrlE5IndexOyx_GGcip
What are these?VPH6
where Bound:Strideable, Bound.Stride:SignedInteger
import Swift
@frozen struct ClosedRange<Bound> where Bound : Comparable
An interval from a lower bound up to, and including, an upper bound.
@frozen struct Range<Bound> where Bound : Comparable
A half-open interval from a lower bound up to, but not including, an upper bound.
@frozen enum Index
@frozen struct Slice<Base> where Base : Collection
A view into a subsequence of elements of another collection.
protocol Strideable<Stride> : Comparable
A type representing continuous, one-dimensional values that can be offset and measured.
protocol SignedInteger : BinaryInteger, SignedNumeric
An integer type that can represent both positive and negative values.
init(_ other: Range<Bound>)
Creates an instance equivalent to the given Range
.
var endIndex: ClosedRange<Bound>.Index { get }
The range’s “past the end” position—that is, the position one greater than the last valid subscript argument.
var startIndex: ClosedRange<Bound>.Index { get }
The position of the first element in the range.
subscript(position: ClosedRange<Bound>.Index) -> Bound { get }
Accesses the element at specified position.
func distance(from start: ClosedRange<Bound>.Index, to end: ClosedRange<Bound>.Index) -> Int
func index(_ i: ClosedRange<Bound>.Index, offsetBy distance: Int) -> ClosedRange<Bound>.Index
func index(after i: ClosedRange<Bound>.Index) -> ClosedRange<Bound>.Index
func index(before i: ClosedRange<Bound>.Index) -> ClosedRange<Bound>.Index
typealias Element = Bound
typealias Iterator = IndexingIterator<ClosedRange<Bound>>
typealias SubSequence = Slice<ClosedRange<Bound>>
init(_ other: ClosedRange<Bound>)
Now that Range is conditionally a collection when Bound: Strideable, CountableRange is no longer needed. This is a deprecated initializer for any remaining uses of Range(countableRange).