---
title: "swapAt(_:_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/mutablespan/swapat(_:_:)"
---

# swapAt(_:_:)

## Declaration

```swift
mutating func swapAt(_ i: MutableSpan<Element>.Index, _ j: MutableSpan<Element>.Index)
```
