NewBufferAndLineOffsets returns an efficient implementation of Buffer for the given text based on the ranges of the encoded code points contained within, as well as returning the line offsets.
(data string)
| 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. |
| 136 | func NewBufferAndLineOffsets(data string) (Buffer, []int32) { |
| 137 | buf, offs, _ := newBufferWithLimit(data, true, -1) |
| 138 | return buf, offs |
| 139 | } |
| 140 | |
| 141 | // NewBufferAndLineOffsetsWithLimit returns an efficient implementation of Buffer for the given text |
| 142 | // and enforces a code point limit while constructing the buffer. |
no test coverage detected