Skip to content

Instance MethodFoundationEssentials

merge(_:mergePolicy:)

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
Merges the container’s attributes with those in another attribute container.
mutating func merge(_ other: AttributeContainer, mergePolicy: AttributedString.AttributeMergePolicy = .keepNew)

Parameters

other

The attribute container with the attributes to merge.

mergePolicy

A policy to use when resolving conflicts between this string’s attributes and those in other.