Contents

AttributedStringProtocol

A protocol that provides common functionality to attributed strings and attributed substrings.

Declaration

@dynamicMemberLookup protocol AttributedStringProtocol : AttributedStringAttributeMutation, CustomStringConvertible, Hashable, Sendable

Overview

Don’t declare new conformances to AttributedStringProtocol. Only the AttributedString and AttributedSubstring types in the standard library are valid conforming types.

Topics

Applying Attributes

Searching for a Substring

Accessing a Range

Accessing Indices

Accessing Views into the Attributed String

Accessing Whole-String Attributes

Comparing Attributed Strings or Substrings

Instance Properties

Default Implementations