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:
@@ -48,7 +48,7 @@ enum class GraphemeClusterBreakProperty : uint8_t {
|
||||
/// by first code point, then by second code point in least-significant-bit
|
||||
/// order. A set bit means that a boundary is prohibited between two code
|
||||
/// points.
|
||||
extern uint16_t ExtendedGraphemeClusterNoBoundaryRulesMatrix[];
|
||||
extern const uint16_t ExtendedGraphemeClusterNoBoundaryRulesMatrix[];
|
||||
|
||||
/// Returns the value of the Grapheme_Cluster_Break property for a given code
|
||||
/// point.
|
||||
|
||||
Reference in New Issue
Block a user