ProtocolSwift
RangeExpression
A type that can be used to slice a collection.
protocol RangeExpression<Bound>
Overview
A type that conforms to RangeExpression
can convert itself to a Range<Bound>
of indices within a given collection.
A type that can be used to slice a collection.
protocol RangeExpression<Bound>
A type that conforms to RangeExpression
can convert itself to a Range<Bound>
of indices within a given collection.
associatedtype Bound : Comparable
The type for which the expression describes a range.
func contains(Self.Bound) -> Bool
Returns a Boolean value indicating whether the given element is contained within the range expression.
func relative<C>(to: C) -> Range<Self.Bound>
Returns the range of indices described by this range expression within the given collection.
static func ~= (Self, Self.Bound) -> Bool
Returns a Boolean value indicating whether a value is included in a range.