---
title: startIndex
framework: swift
role: symbol
role_heading: Instance Property
path: swift/string/utf8view/startindex
---

# startIndex

The position of the first code unit if the UTF-8 view is nonempty.

## Declaration

```swift
var startIndex: String.UTF8View.Index { get }
```

## Discussion

Discussion If the UTF-8 view is empty, startIndex is equal to endIndex.
