Word and Line Calculations in Attributed Strings
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.
Copyright © 1997, 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-02-11