<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributedSubstring/AttributedStringAttributeMutation-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "AttributedStringAttributeMutation Implementations"
}
-->

# AttributedStringAttributeMutation Implementations

## Topics

### Instance Methods

[`func mergeAttributes(AttributeContainer, mergePolicy: AttributedString.AttributeMergePolicy)`](/documentation/Foundation/AttributedSubstring/mergeAttributes(_:mergePolicy:))

Merges the attributed string’s attributes with those in a specified attribute container.

[`func replaceAttributes(AttributeContainer, with: AttributeContainer)`](/documentation/Foundation/AttributedSubstring/replaceAttributes(_:with:))

Replaces the attributed substring’s attributes with those in a specified attribute container.

[`func setAttributes(AttributeContainer)`](/documentation/Foundation/AttributedSubstring/setAttributes(_:))

Sets the attributed substring’s attributes to those in a specified attribute container.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)