Instance Property
range
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
The range of the attribute in the attributed string.
var range: Range<AttributedString.Index>
Discussion
Use this property to examine or alter the range that the attribute applies to.