> On Mar 24, 2017, at 12:08 PM, Ben Langmuir wrote:
>
>
>> On Mar 24, 2017, at 10:59 AM, Tyler Stromberg via swift-dev
>> wrote:
>>
>> I'm currently working on integrating SourceKit with a macOS application.
>> AppKit APIs (e.g. NSAttributedString,
I ended up writing some convenience APIs to perform these conversions along
with many other useful SourceKit<->Cocoa conversions like line+column,
UTF-8, UTF-16 and String.Index in SourceKitten. It's MIT-licensed so feel
free to grab the String extensions from the project yourself:
> On Mar 24, 2017, at 10:59 AM, Tyler Stromberg via swift-dev
> wrote:
>
> I'm currently working on integrating SourceKit with a macOS application.
> AppKit APIs (e.g. NSAttributedString, NSLayoutManager, etc) deal in terms of
> NSRange (UTF-16 code units?). SourceKit,
I'm currently working on integrating SourceKit with a macOS application. AppKit
APIs (e.g. NSAttributedString, NSLayoutManager, etc) deal in terms of NSRange
(UTF-16 code units?). SourceKit, however, deals in terms of integer offsets and
lengths (UTF-8 code units?). Is there a more efficient