Returns the attributes for the character at a given index.
- iOS 3.2+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
- Mac Catalyst 13.0+Beta
The index for which to return attributes. This value must lie within the bounds of the receiver.
Upon return, the range over which the attributes and values are the same as those at
index. This range isn’t necessarily the maximum range covered, and its extent is implementation-dependent. If you need the maximum range, use
attributes(at:. If you don't need this value, pass
longest Effective Range: in:)
The attributes for the character at
index lies beyond the end of the receiver’s characters.
For a list of possible attributes, see Character Attributes.