(data string, idx int, count int)
| 148 | } |
| 149 | |
| 150 | func countRemainingCodePoints(data string, idx int, count int) int { |
| 151 | for idx < len(data) { |
| 152 | _, s := utf8.DecodeRuneInString(data[idx:]) |
| 153 | idx += s |
| 154 | count++ |
| 155 | } |
| 156 | return count |
| 157 | } |
| 158 | |
| 159 | func newBufferWithLimit(data string, lines bool, limit int) (Buffer, []int32, error) { |
| 160 | if len(data) == 0 { |
no outgoing calls
no test coverage detected