mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
9ead8781d4
Co-authored-by: Alex Martini <amartini@apple.com> Co-authored-by: Graham Lee <glee23@apple.com> Co-authored-by: Chris Adamson <cadamson@apple.com> Co-authored-by: Kirby Turner <kirby_turner@apple.com> Co-authored-by: Paris Pinkney <ppinkney@apple.com> Co-authored-by: Dave Spector <dspector@apple.com> Co-authored-by: Sofia Rodriguez Morales <sofia_rodriguez@apple.com> Co-authored-by: Ethan Kusters <ekusters@apple.com> Co-authored-by: Goli Mohammadi <g_mohammadi@apple.com> Co-authored-by: Adora Vaz <a_vaz@apple.com> Co-authored-by: David Rönnqvist <ronnqvist@apple.com> Co-authored-by: Nate Merseth Cook <natecook@apple.com> Co-authored-by: Susan Conant <susan_c@apple.com>
63 lines
1.2 KiB
Markdown
63 lines
1.2 KiB
Markdown
# ``Swift/Range``
|
|
|
|
## Topics
|
|
|
|
### Creating a Range
|
|
|
|
Create a new range using the half-open range operator (`..<`).
|
|
|
|
- ``Swift/Comparable/..<(_:_:)``
|
|
- ``Swift/Range/init(_:)-(ClosedRange<Bound>)``
|
|
|
|
### Converting Ranges
|
|
|
|
- ``Swift/Range/relative(to:)``
|
|
|
|
### Inspecting a Range
|
|
|
|
- ``Swift/Range/isEmpty``
|
|
- ``Swift/Range/lowerBound``
|
|
- ``Swift/Range/upperBound``
|
|
|
|
### Checking for Containment
|
|
|
|
- ``Swift/Range/contains(_:)-(Bound)``
|
|
- ``Swift/Range/contains(_:)-(ClosedRange<Bound>)``
|
|
- ``Swift/Range/contains(_:)-(Range<Bound>)``
|
|
- ``Swift/Range/~=(_:_:)``
|
|
|
|
### Clamping a Range
|
|
|
|
- ``Swift/Range/clamped(to:)``
|
|
|
|
### Comparing Ranges
|
|
|
|
- ``Swift/Range/==(_:_:)``
|
|
- ``Swift/Range/!=(_:_:)``
|
|
- ``Swift/Range/overlaps(_:)-7osha``
|
|
- ``Swift/Range/overlaps(_:)-9fkb2``
|
|
|
|
### Manipulating Indices
|
|
|
|
- ``Swift/Range/hash(into:)``
|
|
|
|
### Describing a Range
|
|
|
|
- ``Swift/Range/description``
|
|
- ``Swift/Range/debugDescription``
|
|
- ``Swift/Range/customMirror``
|
|
|
|
### Encoding and Decoding a Range
|
|
|
|
- ``Swift/Range/encode(to:)``
|
|
- ``Swift/Range/init(from:)``
|
|
|
|
### Destructuring a Range
|
|
|
|
- ``destructure``
|
|
|
|
### Infrequently Used Functionality
|
|
|
|
- ``Swift/Range/init(uncheckedBounds:)``
|
|
- ``Swift/Range/init(_:)-(Range<Bound>)``
|