Contents

replace(with:value:)

Replaces an attribute with a different attribute that a key path identifies.

Declaration

@preconcurrency mutating func replace<U>(with keyPath: KeyPath<AttributeDynamicLookup, U>, value: U.Value) where U : AttributedStringKey, U.Value : Sendable

Parameters

  • keyPath:

    The key path that identifies the new attribute.

  • value:

    The value of the new attribute.

See Also

Replacing Attributes