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

# startIndex

The position of the first code unit if the String is nonempty; identical to endIndex otherwise.

## Declaration

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