---
title: startIndex
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/attributedstring/startindex
---

# startIndex

The position of the first character in a nonempty attributed string.

## Declaration

```swift
var startIndex: AttributedString.Index { get }
```

## Discussion

Discussion In an empty string, startIndex is equal to endIndex.
