Skip to content

Commit 14b9b80

Browse files
authored
Merge pull request #83314 from lorentey/pushing-word-boundaries
[stdlib] Fix implementation of Unicode text segmentation for word boundaries
2 parents f174185 + 847df72 commit 14b9b80

File tree

8 files changed

+1171
-689
lines changed

8 files changed

+1171
-689
lines changed

stdlib/public/core/StringIndexValidation.swift

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -400,20 +400,3 @@ extension _StringGuts {
400400
scalarAlign(validateInclusiveSubscalarIndex_5_7(i)))
401401
}
402402
}
403-
404-
// Word index validation (String)
405-
extension _StringGuts {
406-
internal func validateWordIndex(
407-
_ i: String.Index
408-
) -> String.Index {
409-
return roundDownToNearestWord(scalarAlign(validateSubscalarIndex(i)))
410-
}
411-
412-
internal func validateInclusiveWordIndex(
413-
_ i: String.Index
414-
) -> String.Index {
415-
return roundDownToNearestWord(
416-
scalarAlign(validateInclusiveSubscalarIndex(i))
417-
)
418-
}
419-
}

0 commit comments

Comments
 (0)