# ``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>)``
