We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b257a02 commit e9f11d7Copy full SHA for e9f11d7
stdlib/public/core/StringNormalization.swift
@@ -27,17 +27,8 @@ extension Unicode.Scalar {
27
internal var _isNFCStarter: Bool {
28
// Fast path: All scalars up to U+300 are NFC_QC and have boundaries
29
// 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
+ let normData = Unicode._NormData(self, fastUpperbound: 0x300)
+ return normData.ccc == 0 && normData.isNFCQC
41
}
42
43
0 commit comments