Commit Graph
12 Commits
Author SHA1 Message Date
Karoy Lorentey da78365bef _BString: Add isIdentical(to:) to all string views 2023-03-20 13:12:14 -07:00
Karoy Lorentey 64a8098bf9 _BSubstring.UnicodeScalarView: Fix range-replacing mutations that don’t take indices 2023-03-20 13:12:14 -07:00
Karoy Lorentey b355480eb7 _BString: Make unicodeScalars properties mutable 2023-03-20 13:12:13 -07:00
Karoy Lorentey d79a752fc8 _BString: Review views & add missing functionality/shortcuts 2023-03-20 13:12:13 -07:00
Karoy Lorentey 6a7f53c3da _BString: Add conversion initializers from all views 2023-03-20 13:12:12 -07:00
Karoy Lorentey 03d7c43c22 _BString: Add index rounding methods to all views 2023-03-20 13:12:12 -07:00
Karoy Lorentey 258d22947c _BString: Review Equatable implementations 2023-03-20 13:12:12 -07:00
Karoy Lorentey abf5dfd260 _BSubstring: Conform to Comparable 2023-03-20 13:12:12 -07:00
Karoy Lorentey 1182398068 _BString: Give each view a custom iterator by hooking up the existing implementations 2023-03-20 13:12:12 -07:00
Karoy Lorentey a10439bc32 _BString, _BSubstring: Merge character views into top-level types. Add RangeReplaceableCollection conformances.
This emulates the standard String.
2023-03-20 13:12:12 -07:00
Karoy Lorentey 28727f7c56 _BString: Implement views
Having all core functionality exposed by the top-level type is not a bad idea; unfortunately substrings are tricky to get right, so it’s better to implement that out of the box.
2023-03-20 13:12:11 -07:00
Karoy Lorentey 85a43d9ac6 _BString: Add a substring types and actual collection views
This is more of a technical workaround, as it allows
running generic algorithms on these things. That said,
we could embrace this in general, and sink the
`utf8Index(after:)`, `characterIndex(before:)` etc
function down into these views, instead of having them
on the top level.
2023-03-20 13:12:11 -07:00