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 or easier way to convert 
back and forth between the two other than doing the index(_:offsetBy:) -> 
samePosition(in:) dance?
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to