Avatar
@swift-4.1.3 @swift-4.2.4 @swift-5.0.3 let café = "café" let index = café.utf8.index(before: café.utf8.endIndex) // The last byte. let before = String(café[..<index]) let after = String(café[index...]) print(before + after) // “café” print(after.utf8.count) // 2 bytes?!?