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

# AttributedStringAttributeMutation Implementations

## Topics

### Instance Methods

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

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

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

Replaces occurrences of attributes in one attribute container with those in another attribute container.

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

Sets the attributed string’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)