Returns the attributes for the character at a given index.
- iOS 3.2+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
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. If you don't need this value, pass
At Index: longest Effective Range: in Range:
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.