# and reallocations when concatenating `String` objects.
module buffered_ropes
-intrude import standard::ropes
+intrude import standard::text::ropes
# Hidden buffer, used to simulate a `FlatBuffer` on a short string.
#
#
# Basically just returns `self` encapsulated in a `FlatString`.
private class LeafSubstrings
- super IndexedIterator[Text]
+ super IndexedIterator[FlatText]
var leaf: Leaf
- var str: String is noinit
+ var str: FlatString is noinit
var avail = true
init do
# Leaf of a `Rope`, used as a buffered area for speedy concatenation.
private class Leaf
- super RopeString
+ super String
+ super Rope
- private var buf: ManualBuffer
- private var bns: NativeString is noinit
+ var buf: ManualBuffer
+ var bns: NativeString is noinit
redef var length: Int is noinit
redef fun empty do return new Leaf(new ManualBuffer)