mirror of
https://github.com/apple/swift-collections
synced 2026-11-30 05:18:44 +00:00
Add some operations taking subsequences
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user