Rope.rebalance

struct Rope
const nothrow
rebalance
()
out (r) { assert (r.isBalanced, format("rebalance(%s) failed. Depth %s (left %s, right %s)", this, depth, left.depth, right.depth).assumeWontThrow); }

Return Value

Type: Rope

If the rope is unbalanced, returns a copy of the rope, optimized to improve reading performance. If the rope is already balanced, returns the original rope unmodified.

Meta