API Collection
AttributedStringProtocol Implementations
Topics
Instance Properties
var characters: AttributedString.CharacterViewThe characters of the attributed string, as a view into the underlying string.var endIndex: AttributedString.IndexThe string’s past-the-end position — the position one greater than the last valid subscript argument.var runs: AttributedString.RunsThe attributed runs of the attributed string, as a view into the underlying string.var startIndex: AttributedString.IndexThe position of the first character in a nonempty attributed string.var unicodeScalars: AttributedString.UnicodeScalarViewThe Unicode scalars of the attributed string, as a view into the underlying string.var utf16: AttributedString.UTF16ViewA view of the attributed string’s contents as a collection of UTF-16 code units.var utf8: AttributedString.UTF8ViewA view of the attributed string’s contents as a collection of UTF-8 code units.
Subscripts
subscript(_:)subscript<K>(K.Type) -> K.Value?subscript(some RangeExpression<AttributedString.Index>) -> AttributedSubstringReturns a substring of the attributed string using a range to indicate the substring bounds.subscript(dynamicMember:)Returns an attribute value that a key path indicates.subscript<S>(dynamicMember _: KeyPath<AttributeScopes, S.Type>) -> ScopedAttributeContainer<S>Returns a scoped attribute container that a key path indicates.subscript<K>(dynamicMember _: KeyPath<AttributeDynamicLookup, K>) -> K.Value?Returns an attribute value that a key path indicates.