AttributedStringProtocol
A protocol that provides common functionality to attributed strings and attributed substrings.
Declaration
@dynamicMemberLookup protocol AttributedStringProtocol : AttributedStringAttributeMutation, CustomStringConvertible, Hashable, SendableOverview
Don’t declare new conformances to AttributedStringProtocol. Only the AttributedString and AttributedSubstring types in the standard library are valid conforming types.
Topics
Applying Attributes
settingAttributes(_:)mergingAttributes(_:mergePolicy:)AttributedString.AttributeMergePolicyreplacingAttributes(_:with:)
Searching for a Substring
Accessing a Range
Accessing Indices
startIndexendIndexindex(_:offsetByCharacters:)index(_:offsetByRuns:)index(_:offsetByUnicodeScalars:)index(afterCharacter:)index(afterRun:)index(afterUnicodeScalar:)index(beforeCharacter:)index(beforeRun:)index(beforeUnicodeScalar:)AttributedString.Index
Accessing Views into the Attributed String
Accessing Whole-String Attributes
subscript(_:)subscript(dynamicMember:)AttributeDynamicLookupsubscript(dynamicMember:)ScopedAttributeContainer