Documentation
¶
Index ¶
- type Reader
- type Rope
- func (r *Rope) Alter(start, end int, value string) error
- func (r *Rope) ByteLength() int
- func (r *Rope) Insert(position int, value string) error
- func (r *Rope) Length() int
- func (r *Rope) NewReader() io.Reader
- func (r *Rope) Rebalance()
- func (r *Rope) Remove(start, end int) error
- func (r *Rope) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements io.Reader and io.WriterTo for a Rope rope
type Rope ¶
type Rope struct {
// contains filtered or unexported fields
}
Rope is a data structure that represents a string. Internally, the string is fractured into smaller strings to facilitate faster editing at the expense of memory usage
func CreateRope ¶
CreateRope creates a Rope with the given initial value
func (*Rope) ByteLength ¶
ByteLength returns the number of bytes necessary to store a contiguous representation of the Rope's contents
func (*Rope) NewReader ¶
NewReader returns an `io.Reader` that will allow consuming the rope as a contiguous stream of bytes.
Click to show internal directories.
Click to hide internal directories.