Title: Theory / Important / CS / Programming / Objective-C / Library / NS / AttributedString

Typ: NS(Mutable)AttributedString
Meaning: A string with associated attributes (such as visual style, hyperlinks, or accessibility data) for portions of its text.
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Language: Objective-C
Implementation: A string, and map from range to NSDictionary of attribute/value pairs

Name: An attributed string
Definition: An association of characters and their attributes
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Context: Objective-C

Name: An effective range of attribute
Definition: A range over which attribute holds the same value.
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Variables: attrString an attibutedString
attribute an attribute
Context: Objective-C
Intuition: A range that can be easily computed/already available information

Name: A maximal range of attribute
Definition: A maximal range over which attribute holds the same value.
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Variables: attrString an attibutedString
attribute an attribute
Context: Objective-C

Instruction: [attributedString
  attributesAtIndex:index
  effectiveRange:range
]
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Effect: set the range to an effective range of all of those attributes
Language: Objective-C
Returns: dictionarry of attributes at index
Variables: attributedString

Instruction: [attributedString
  attributesAtIndex:index
  longesEffectiveRange:maximalRange
  effectiveRange:range
]
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Effect: set the maximalRange and range to an effective range of all of those attributes
Language: Objective-C
Returns: dictionarry of attributes at index
Variables: attributedString

Instruction: [attributedString
  attribute:attribute
  atIndex:index
  longesEffectiveRange:maximalRange
  effectiveRange:range
]
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Effect: set the maximalRange and range to an effective range of all of those attributes
Language: Objective-C
Returns: Value of attribute at index
Variables: attributedString

Instruction: [attributedString
  attribute:attribute
  atIndex:index
  effectiveRange:range
]
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Effect: set the range to an effective range of all of those attributes
Language: Objective-C
Returns: Value of attribute at index
Variables: attributedString

Instruction: [attributedString
  fontAttributesInRange:range
]
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Effect: todo
Language: Objective-C
Variables: attributedString

Instruction: [attributedString
  rulerAttributesInRange:range
]
Page: https://developer.apple.com/documentation/foundation/nsattributedstring?language=objc
Effect: todo
Language: Objective-C
Variables: attributedString

Instruction: [attributedString
  startEditing
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/AttributedStrings/Tasks/ChangingAttrStrings.html
Effect: set the string in editing mode
Language: Objective-C
Variables: NSMutableAttributedString* attributedString

Instruction: [attributedString
  endEditing
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/AttributedStrings/Tasks/ChangingAttrStrings.html
Effect: set the string off editing mode
Language: Objective-C
Variables: NSMutableAttributedString* attributedString

Instruction: [attributedString
  addAttribute:Attribute
  value:value
  range:range
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/AttributedStrings/Tasks/ChangingAttrStrings.html
Effect: Add an attribute attribute:value on range
Language: Objective-C
Variables: NSMutableAttributedString* attributedString
Assuming: String is in edit mode