@@ -35,7 +35,7 @@ private func _hasGraphemeBreakBetween(
35
35
switch x. value {
36
36
// Unified CJK Han ideographs, common and some supplemental, amongst
37
37
// others:
38
- // 0x3400-0xA4CF
38
+ // U+3400 ~ U+A4CF
39
39
case 0x3400 ... 0xa4cf : return true
40
40
41
41
// Repeat sub-300 check, this is beneficial for common cases of Latin
@@ -46,31 +46,35 @@ private func _hasGraphemeBreakBetween(
46
46
case 0x0000 ... 0x02ff : return true
47
47
48
48
// Non-combining kana:
49
- // 0x3041-0x3096
50
- // 0x30A1-0x30FA
49
+ // U+3041 ~ U+3096
50
+ // U+30A1 ~ U+30FC
51
51
case 0x3041 ... 0x3096 : return true
52
- case 0x30a1 ... 0x30fa : return true
52
+ case 0x30a1 ... 0x30fc : return true
53
53
54
54
// Non-combining modern (and some archaic) Cyrillic:
55
- // 0x0400-0x0482 (first half of Cyrillic block)
55
+ // U+0400 ~ U+0482 (first half of Cyrillic block)
56
56
case 0x0400 ... 0x0482 : return true
57
57
58
58
// Modern Arabic, excluding extenders and prependers:
59
- // 0x061D-0x064A
59
+ // U+061D ~ U+064A
60
60
case 0x061d ... 0x064a : return true
61
61
62
62
// Precomposed Hangul syllables:
63
- // 0xAC00–0xD7AF
63
+ // U+AC00 ~ U+D7AF
64
64
case 0xac00 ... 0xd7af : return true
65
65
66
66
// Common general use punctuation, excluding extenders:
67
- // 0x2010-0x2029
67
+ // U+2010 ~ U+2029
68
68
case 0x2010 ... 0x2029 : return true
69
69
70
70
// CJK punctuation characters, excluding extenders:
71
- // 0x3000-0x3029
71
+ // U+3000 ~ U+3029
72
72
case 0x3000 ... 0x3029 : return true
73
73
74
+ // Full-width forms:
75
+ // U+FF01 ~ U+FF9D
76
+ case 0xFF01 ... 0xFF9D : return true
77
+
74
78
default : return false
75
79
}
76
80
}
0 commit comments