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 10
10
//
11
11
//===----------------------------------------------------------------------===//
12
12
13
- import SwiftShims
14
-
15
13
extension Unicode . Scalar {
16
14
// Normalization boundary - a place in a string where everything left of the
17
15
// boundary can be normalized independently from everything right of the
@@ -27,17 +25,8 @@ extension Unicode.Scalar {
27
25
internal var _isNFCStarter : Bool {
28
26
// Fast path: All scalars up to U+300 are NFC_QC and have boundaries
29
27
// 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
41
30
}
42
31
}
43
32
You can’t perform that action at this time.
0 commit comments