- (NSDictionary *)attributesAtIndex:(unsigned)location effectiveRange:(NSRange *)range; /* Can pass NULL for range. Note that range isn't necessarily the longest range for which the attribute values are the same. */
- (id)attribute:(NSString *)attrName atIndex:(unsigned int)location effectiveRange:(NSRange *)range; /* Can pass NULL for range. Note that range isn't necessarily the longest range for which the attribute is the same. */
/* These methods are the same as attributesAtIndex:effectiveRange: & attribute:atIndex:effectiveRange:; but they compute the longest effective range where the attributes values are the same. Use rangeLimit to limit the search area. The resulting range is clipped to this value.
/**** NSMutableAttributedString, an abstract class ****/
@interface NSMutableAttributedString : NSAttributedString /* The primitive methods */
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; /* The newly inserted characters have the attributes of the first replaced character; if none replaced, those of the previous character; if none, from the next character */
- (void)setAttributes:(NSDictionary *)attrs range:(NSRange)range; /* Replaces all attributes in the range */
- (void)setAttributedString:(NSAttributedString *)attrString; /* Replace the whole thing */
/* Subclasses interested in hearing about changes need to implement these methods. Default implementations of these do nothing. All methods which change the attributed string using multiple calls should call these messages to coalesce any post-editing processes.