@@ -640,11 +640,11 @@ extension _StringGuts {
640
640
nextScalar: ( Int ) -> ( scalar: Unicode . Scalar , end: Int ) ?
641
641
) -> Int {
642
642
_internalInvariant ( index < endIndex. _encodedOffset)
643
- return _nextBoundary ( startingAt: index, nextScalar: nextScalar)
643
+ return _nextGraphemeClusterBoundary ( startingAt: index, nextScalar: nextScalar)
644
644
}
645
645
}
646
646
647
- fileprivate func _nextBoundary (
647
+ internal func _nextGraphemeClusterBoundary (
648
648
startingAt index: Int ,
649
649
nextScalar: ( Int ) -> ( scalar: Unicode . Scalar , end: Int ) ?
650
650
) -> Int {
@@ -668,21 +668,21 @@ fileprivate func _nextBoundary(
668
668
}
669
669
670
670
extension _StringGuts {
671
- // Returns the stride of the grapheme cluster ending at offset `index`.
672
- //
673
- // This method uses `previousScalar` to looks back in the string as far as
674
- // necessary to find a correct grapheme cluster boundary, whether or not
675
- // `index` happens to be on a boundary itself.
676
671
fileprivate func previousBoundary(
677
672
endingAt index: Int ,
678
673
previousScalar: ( Int ) -> ( scalar: Unicode . Scalar , start: Int ) ?
679
674
) -> Int {
680
- _previousBoundary ( endingAt: index, previousScalar: previousScalar)
675
+ _previousGraphemeClusterBoundary ( endingAt: index, previousScalar: previousScalar)
681
676
}
682
677
683
678
}
684
679
685
- fileprivate func _previousBoundary(
680
+ // Returns the stride of the grapheme cluster ending at offset `index`.
681
+ //
682
+ // This method uses `previousScalar` to looks back in the string as far as
683
+ // necessary to find a correct grapheme cluster boundary, whether or not
684
+ // `index` happens to be on a boundary itself.
685
+ internal func _previousGraphemeClusterBoundary(
686
686
endingAt index: Int ,
687
687
previousScalar: ( Int ) -> ( scalar: Unicode . Scalar , start: Int ) ?
688
688
) -> Int {
0 commit comments