Skip to content

Instance Property

unicodeScalars

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
The Unicode scalars of the attributed string, as a view into the underlying string.
var unicodeScalars: AttributedString.UnicodeScalarView { get }

Discussion

Use this property when you want to split the attributed string by Unicode scalar instead of grapheme cluster. This is useful when you need to carefully control insertion points or render the content.