Commit Graph
7 Commits
Author SHA1 Message Date
Karoy Lorentey eda72e344f _BString: Fix character index rounding; use it when accessing character data
Oops, `_BString.subscript(character:)` failed to round down to a character boundary before trying to access the addressed character. It also resolved the index with `preferEnd` set to true, which isn’t what we actually want.
2023-03-20 13:12:12 -07:00
Karoy Lorentey b5e3bee275 _BString.Index: Add alignment bits
Use them to speed up index rounding.
(And, somewhat questionably, subscripting.)
2023-03-20 13:12:11 -07:00
Karoy Lorentey fe54fdaa47 More fixes. 2023-03-20 13:12:10 -07:00
Karoy Lorentey 605e45b9b9 _BString: Additional fixes and new functionality
- New methods for rounding up indices
- Sendable conformances
- Fix UTF-16 strings sometimes leaking into chunks
- Iterator improvements / rewrites, incl. a chunked UTF-8
   buffer iterator.
- Support for comparing and hashing UTF-8 slices.
2023-03-20 13:12:10 -07:00
Karoy Lorentey 79bdcb66eb Implement path caching in indices 2023-03-20 13:12:10 -07:00
Karoy Lorentey 8c8cb5622b Restrict BIgString and _BString to Swift 5.8 and macOS 13.3 /iOS 16.4/etc
These types heavily rely on stdlib functionality that ships in
Swift 5.8; they do not run correctly on earlier releases.
2023-03-20 13:12:09 -07:00
Karoy Lorentey 150a165d73 Add experimental rope implementation 2023-03-20 13:11:21 -07:00