# ``Swift/ClosedRange``

## Topics

### Creating a Range

Create a new range using the closed range operator (`...`).

- ``Swift/Comparable/...(_:_:)``

### Converting Ranges

- ``Swift/ClosedRange/relative(to:)``

### Inspecting a Range

- ``Swift/ClosedRange/isEmpty``
- ``Swift/ClosedRange/lowerBound``
- ``Swift/ClosedRange/upperBound``

### Checking for Containment

- ``Swift/ClosedRange/contains(_:)-(Bound)``
- ``Swift/ClosedRange/contains(_:)-(ClosedRange<Bound>)``
- ``Swift/ClosedRange/contains(_:)-(Range<Bound>)``
- ``Swift/ClosedRange/~=(_:_:)``

### Clamping a Range

- ``Swift/ClosedRange/clamped(to:)``

### Comparing Ranges

- ``Swift/ClosedRange/==(_:_:)``
- ``Swift/ClosedRange/!=(_:_:)``
- ``Swift/ClosedRange/overlaps(_:)-947dt``
- ``Swift/ClosedRange/overlaps(_:)-7dfep``

### Manipulating Indices

- ``Swift/ClosedRange/hash(into:)``

### Describing a Range

- ``Swift/ClosedRange/description``
- ``Swift/ClosedRange/debugDescription``
- ``Swift/ClosedRange/customMirror``

### Encoding and Decoding a Range

- ``Swift/ClosedRange/encode(to:)``
- ``Swift/ClosedRange/init(from:)``

### Infrequently Used Functionality

- ``Swift/ClosedRange/init(uncheckedBounds:)``
