mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib/String: implement Unicode extended grapheme cluster segmentation
algorithm The implementation uses a specialized trie that has not been tuned to the table data. I tried guessing parameter values that should work well, but did not do any performance measurements. There is no efficient way to initialize arrays with static data in Swift. The required tables are being generated as C++ code in the runtime library. rdar://16013860 Swift SVN r19340
This commit is contained in:
@@ -62,6 +62,16 @@ extension String {
|
||||
return IndexType(i, _core)
|
||||
}
|
||||
|
||||
/// The end index that for this view.
|
||||
@internal var _viewStartIndex: IndexType {
|
||||
return IndexType(_core.startIndex, _core)
|
||||
}
|
||||
|
||||
/// The end index that for this view.
|
||||
@internal var _viewEndIndex: IndexType {
|
||||
return IndexType(_core.endIndex, _core)
|
||||
}
|
||||
|
||||
var _position: Int
|
||||
var _core: _StringCore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user