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 1212@_spi ( _Unicode)
1313import Swift
1414
15+ // TODO: Sink onto String
1516extension Processor {
1617 func atSimpleBoundary(
1718 _ usesAsciiWord: Bool ,
@@ -20,9 +21,11 @@ extension Processor {
2021 func matchesWord( at i: Input . Index ) -> Bool {
2122 switch semanticLevel {
2223 case . graphemeCluster:
24+ // TODO: needs benchmark coverage
2325 let c = input [ i]
2426 return c. isWordCharacter && ( c. isASCII || !usesAsciiWord)
2527 case . unicodeScalar:
28+ // TODO: needs benchmark coverage
2629 let c = input. unicodeScalars [ i]
2730 return ( c. properties. isAlphabetic || c == " _ " ) && ( c. isASCII || !usesAsciiWord)
2831 }
@@ -51,6 +54,7 @@ extension String {
5154 using cache: inout Set < String . Index > ? ,
5255 _ maxIndex: inout String . Index ?
5356 ) -> Bool {
57+ // TODO: needs benchmark coverage
5458 guard i != startIndex, i != endIndex else {
5559 return true
5660 }
You can’t perform that action at this time.
0 commit comments