transformingAttributes(_:_:_:_:)
Returns an attributed string by calling a closure that transforms three attributes of a source attributed string.
Declaration
@preconcurrency func transformingAttributes<K1, K2, K3>(_ k: K1.Type, _ k2: K2.Type, _ k3: K3.Type, _ c: (inout AttributedString.SingleAttributeTransformer<K1>, inout AttributedString.SingleAttributeTransformer<K2>, inout AttributedString.SingleAttributeTransformer<K3>) -> Void) -> AttributedString where K1 : AttributedStringKey, K2 : AttributedStringKey, K3 : AttributedStringKey, K1.Value : Sendable, K2.Value : Sendable, K3.Value : SendableParameters
- k:
The Attributedstringkey that identifies an attribute to transform.
- k2:
The Attributedstringkey that identifies a second attribute to transform.
- k3:
The Attributedstringkey that identifies a third attribute to transform.
- c:
A closure that receives three Singleattributetransformer instances that you use to access and alter the attributes’ ranges and values.
Return Value
An attributed string with the applied transformations to the specified attributes.
See Also
Transforming Attributes
transformingAttributes(_:_:)transformingAttributes(_:_:)transformingAttributes(_:_:_:)transformingAttributes(_:_:_:)transformingAttributes(_:_:_:_:)transformingAttributes(_:_:_:_:_:)transformingAttributes(_:_:_:_:_:)transformingAttributes(_:_:_:_:_:_:)transformingAttributes(_:_:_:_:_:_:)AttributedString.SingleAttributeTransformer