MutableGapBuffer
An interface representing a mutable gap buffer, containing a sequence of T, which is optimized for chunk insertions and removals.
Gap buffers are data structures which support amortized constant-time consecutive insertions, similarly to an array-based list, but at arbitrary buffer positions. They may be used to store a sequence of items which are known to be inserted group-wise.
In a gap buffer, positions are known as offsets. An offset is semantically identical to an index in an array, except that it jumps over the gap.
Functions
Link copied to clipboard
Properties
Extensions
Link copied to clipboard
inline fun <T> MutableGapBuffer<T>.copyOfRange(from: Int, until: Int): Array<T>
Content copied to clipboard
Copies the given range from the MutableGapBuffer.
Link copied to clipboard
Link copied to clipboard
Copies the contents of this MutableGapBuffer into a new ByteArray.