Skip to content

Commit 538727a

Browse files
committed
wip
1 parent f4eaf2b commit 538727a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

stdlib/public/core/StringGraphemeBreaking.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,11 @@ extension _StringGuts {
640640
nextScalar: (Int) -> (scalar: Unicode.Scalar, end: Int)?
641641
) -> Int {
642642
_internalInvariant(index < endIndex._encodedOffset)
643-
return _nextBoundary(startingAt: index, nextScalar: nextScalar)
643+
return _nextGraphemeClusterBoundary(startingAt: index, nextScalar: nextScalar)
644644
}
645645
}
646646

647-
fileprivate func _nextBoundary(
647+
internal func _nextGraphemeClusterBoundary(
648648
startingAt index: Int,
649649
nextScalar: (Int) -> (scalar: Unicode.Scalar, end: Int)?
650650
) -> Int {
@@ -668,21 +668,21 @@ fileprivate func _nextBoundary(
668668
}
669669

670670
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.
676671
fileprivate func previousBoundary(
677672
endingAt index: Int,
678673
previousScalar: (Int) -> (scalar: Unicode.Scalar, start: Int)?
679674
) -> Int {
680-
_previousBoundary(endingAt: index, previousScalar: previousScalar)
675+
_previousGraphemeClusterBoundary(endingAt: index, previousScalar: previousScalar)
681676
}
682677

683678
}
684679

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(
686686
endingAt index: Int,
687687
previousScalar: (Int) -> (scalar: Unicode.Scalar, start: Int)?
688688
) -> Int {

0 commit comments

Comments
 (0)