1:40 PM
しかしよく調べると、元は https://github.com/apple/swift/pull/20315String.Index.init(encodedOffset:)のパラメータの意味合いがこっそり変わっているのが原因で、他にも影響を受けているところがありそう。
Original PR Switch the native encoding of String to be UTF-8 and finalize String's ABI for Swift 5.0. Resolves SR-7602. rdar://problem/42339222
1:43 PM
ぬう、 @rintaro さんは https://bugs.swift.org/browse/SR-9311`String.Index.encodedOffset` doesn't necessarily mean UTF16 offset. とか書いてるな。今までUTF-16オフセットとしてたのが間違いだったのかな?
1:48 PM
ここにもThe current Swift toolchainとあります なるほど。