mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
stdlib: add a couple of ABI FIXMEs to String implementation
We should not make grapheme segmentation algorithm inlineable now (and possibly ever). The immediate reason is that Unicode 8.0 grapheme segmentation algorithm has been changed significantly in Unicode 9.0. Unicode 9.0 requires a stateful algorithm. Current indices and iterators just don't have the storage for that state, so we can't mark them as fragile.
This commit is contained in:
@@ -577,6 +577,8 @@ extension String.UnicodeScalarIndex {
|
||||
}
|
||||
|
||||
extension String.UnicodeScalarView {
|
||||
// FIXME(ABI): don't make this function inlineable. Grapheme cluster
|
||||
// segmentation uses a completely different algorithm in Unicode 9.0.
|
||||
internal func _isOnGraphemeClusterBoundary(_ i: Index) -> Bool {
|
||||
if i == startIndex || i == endIndex {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user