Add some operations taking subsequences

This commit is contained in:
Karoy Lorentey committed 2023-03-20 13:12:07 -07:00
1 parent 150a165d73
commit eabd941799
12 files changed
+344 -80

No files matched your search

@@ -94,7 +94,12 @@ extension _BString.Builder {
var state = _CharacterRecognizer()
append(other.rope, state: &state)
}
mutating func append(_ other: __owned _BString, in range: Range<_BString.Index>) {
let extract = _BString(other, in: range, state: &self.prefixEndState)
self.base.append(extract.rope)
}
mutating func append(_ other: __owned Rope, state: inout _CharacterRecognizer) {
guard !other.isEmpty else { return }
var other = _BString(rope: other)