---
title: Substring.CharacterView
framework: swift
role: symbol
role_heading: Type Alias
path: swift/substring/characterview
---

# Substring.CharacterView

A view of a string’s contents as a collection of characters.

## Declaration

```swift
typealias CharacterView = Substring
```

## Discussion

Discussion Previous versions of Swift provided this view since String itself was not a collection. String is now a collection of characters, so this type is now just an alias for String.
