File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Sources/_StringProcessing/Unicode Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 12
12
@_spi ( _Unicode)
13
13
import Swift
14
14
15
+ // TODO: Sink onto String
15
16
extension Processor {
16
17
func atSimpleBoundary(
17
18
_ usesAsciiWord: Bool ,
@@ -20,9 +21,11 @@ extension Processor {
20
21
func matchesWord( at i: Input . Index ) -> Bool {
21
22
switch semanticLevel {
22
23
case . graphemeCluster:
24
+ // TODO: needs benchmark coverage
23
25
let c = input [ i]
24
26
return c. isWordCharacter && ( c. isASCII || !usesAsciiWord)
25
27
case . unicodeScalar:
28
+ // TODO: needs benchmark coverage
26
29
let c = input. unicodeScalars [ i]
27
30
return ( c. properties. isAlphabetic || c == " _ " ) && ( c. isASCII || !usesAsciiWord)
28
31
}
@@ -51,6 +54,7 @@ extension String {
51
54
using cache: inout Set < String . Index > ? ,
52
55
_ maxIndex: inout String . Index ?
53
56
) -> Bool {
57
+ // TODO: needs benchmark coverage
54
58
guard i != startIndex, i != endIndex else {
55
59
return true
56
60
}
You can’t perform that action at this time.
0 commit comments