The Application Kit’s extensions to NSAttributedString
support the typical behavior of text editors in selecting a word on a double-click with the `=doubleClickAtIndex: method, and finds word breaks with nextWordFromIndex:forward:. It also calculates line breaks with the lineBreakBeforeIndex:withinRange: method.
- Application Kit对NSAttributedString的扩展支持文本编辑器在使用`= doubleClickAtIndex:方法双击时选择单词的典型行为,并使用nextWordFromIndex:forward:查找单词分隔符。 它还使用lineBreakBeforeIndex:withinRange:方法计算换行符。
网友评论