A partial half-open interval up to, but not including, an upper bound.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
Overview
You create Partial
instances by using the prefix half-open range operator (prefix ..<
).
You can use a Partial
instance to quickly check if a value is contained in a particular range of values. For example:
You can use a Partial
instance of a collection’s indices to represent the range from the start of the collection up to, but not including, the partial range’s upper bound.