Replaces a specified range in the receiver’s text storage with the given string and sets the selection.
- macOS 10.5+
The string to insert. Can be either an
The range to set as the selection, computed from the beginning of the inserted string.
The range to replace, computed from the beginning of the marked text.
If there is no marked text, the current selection is replaced. If there is no selection, the string is inserted at the insertion point.
a is an
NSString object, the receiver is expected to render the marked text with distinguishing appearance (for example,
NSText renders with