Instance MethodFoundationEssentials
filter(runBoundaries:)
iOS 26.0+
iPadOS 26.0+
Mac Catalyst 26.0+
macOS 26.0+
tvOS 26.0+
visionOS 26.0+
watchOS 26.0+
Returns a copy of the attribute container with only attributes that have the provided run boundaries.
func filter(runBoundaries: AttributedString.AttributeRunBoundaries?) -> AttributeContainer
Parameters
runBoundariesThe required
runBoundariesvalue of the filtered attributes. Ifnilis provided, only attributes not bound to any specific boundary will be returned.
Return Value
A copy of the attribute container with only attributes whose runBoundaries property matches the provided value.