Avatar
norio_nomura 1/24/2019 5:25 AM
swift-corelibs-foundationで実際に壊れてたのを修正するパッチ。 NSStringのAPIがNSRangeで返してきたものをRange<String.Index>へ変換する際に使われてた。 /// Return an `Index` corresponding to the given offset in our UTF-16 /// representation. func _index(_ utf16Index: Int) -> Index { - return Index(encodedOffset: utf16Index + _substringOffset) + return self.utf16.index(self.utf16.startIndex, offsetBy: utf16Index) } https://github.com/apple/swift-corelibs-foundation/pull/1841/commits/de8eaceaa0b8c23ade0690f80c094c3304d31667#diff-45748247f2cea16dbd8450b033d6654fR446