---
title: AttributeScopes.FoundationAttributes.ReplacementIndexAttribute
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/attributescopes/foundationattributes/replacementindexattribute
---

# AttributeScopes.FoundationAttributes.ReplacementIndexAttribute

A type for using a replacement index as an attribute.

## Declaration

```swift
@frozen enum ReplacementIndexAttribute
```

## Overview

Overview When you use the applyReplacementIndexAttribute formatting option, the resulting formatted string uses this attribute to mark the location of replacement strings. This allows you to relate ranges to replacements even if localizers change the word order in format strings.

## Relationships

### Conforms To

- [AttributedStringKey](foundation/attributedstringkey.md)
- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)
- [DecodableAttributedStringKey](foundation/decodableattributedstringkey.md)
- [EncodableAttributedStringKey](foundation/encodableattributedstringkey.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Using string formatting attributes

- [replacementIndex](foundation/attributescopes/foundationattributes/replacementindex.md)
