replaceSubrange(_:with:)
Replaces the contents in a range of the attributed string.
Declaration
mutating func replaceSubrange(_ range: some RangeExpression<AttributedString.Index>, with s: some AttributedStringProtocol)Parameters
- range:
The range of the attributed string to replace.
- s:
The string to insert in place of the replaced range.