---
title: previous()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/utf8span/characteriterator/previous()
---

# previous()

Return the Character ending at currentCodeUnitOffset. After the function returns, currentCodeUnitOffset holds the position at the start of the returned Character, which is also the end of the previous Character.

## Declaration

```swift
mutating func previous() -> Character?
```

## Discussion

Discussion Returns nil if at the start of the UTF8Span.
