TextBuffer
Inherits Reference < Object
TextBuffer is an abstraction over a string and an array
of line bounds (see Line) in that string. These bounds are
recomputed after every update (e.g. on every keystroke).
The latter is done as quickly as possible, so there is little performance penalty in exchange for great ease-of-use.
Constants
Characters per line, on average. A heuristic used to pre- allocate the line array.
Non-whitespace characters that terminate word boundary search.
Constructors
Instance methods
Two buffers are equal if their strings are equal.
Two buffers are equal if their strings are equal.
Slices this buffer from begin index to end index. Both ends are included.
Yields buffer string to the block. Updates buffer string with block result.
Finds word begin position by going back as far as possible,
stopping either on word stop characters WORDSTOP or the
first whitespace.
Find end position by going forth as far as possible, stopping either on word stop characters or the first whitespace.