Skip to content

Commit 73312fe

Browse files
committed
[stdlib] Grapheme breaking: Refactor to simplify logic
- Split forward and backward direction into separate code paths. This makes the code more readable and paves the way for future improvements. (E.g., switching to a linear-time algorithm for breaking backwards.) - `Substring.index(after:)` now uses the same grapheme breaking paths as `String.index(after:)`. - The cached stride value in string indices is now well-defined even on indices that aren’t character-aligned.
1 parent 4247279 commit 73312fe

File tree

4 files changed

+291
-185
lines changed

4 files changed

+291
-185
lines changed

0 commit comments

Comments
 (0)