Contents

replace(with:value:)

Replaces an attribute with a different attribute.

Declaration

@preconcurrency mutating func replace<U>(with key: U.Type, value: U.Value) where U : AttributedStringKey, U.Value : Sendable

Parameters

  • key:

    The key of the new attribute.

  • value:

    The value of the new attribute.

See Also

Replacing Attributes