NewBuffer returns an efficient implementation of Buffer for the given text based on the ranges of the encoded code points contained within.
(data string)
| 127 | // NewBuffer returns an efficient implementation of Buffer for the given text based on the ranges of |
| 128 | // the encoded code points contained within. |
| 129 | func NewBuffer(data string) Buffer { |
| 130 | buf, _, _ := newBufferWithLimit(data, false, -1) |
| 131 | return buf |
| 132 | } |
| 133 | |
| 134 | // NewBufferAndLineOffsets returns an efficient implementation of Buffer for the given text based on |
| 135 | // the ranges of the encoded code points contained within, as well as returning the line offsets. |