File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 1010//
1111//===----------------------------------------------------------------------===//
1212
13- import SwiftShims
14-
1513extension Unicode . Scalar {
1614 // Normalization boundary - a place in a string where everything left of the
1715 // boundary can be normalized independently from everything right of the
@@ -27,17 +25,8 @@ extension Unicode.Scalar {
2725 internal var _isNFCStarter : Bool {
2826 // Fast path: All scalars up to U+300 are NFC_QC and have boundaries
2927 // before them.
30- if value < 0x300 {
31- return true
32- }
33-
34- // Any scalar who has CCC of 0 has a normalization boundary before it AND
35- // any scalar who is also NFC_QC is considered an NFC starter.
36- let normData = _swift_stdlib_getNormData ( value)
37- let ccc = normData >> 3
38- let isNFCQC = normData & 0x6 == 0
39-
40- return ccc == 0 && isNFCQC
28+ let normData = Unicode . _NormData ( self , fastUpperbound: 0x300 )
29+ return normData. ccc == 0 && normData. isNFCQC
4130 }
4231}
4332
You can’t perform that action at this time.
0 commit comments