Lines Matching refs:read
60 read := input
67 advance := func(write, read []byte, count int) ([]byte, []byte) {
68 copy(write, read[:count])
69 return write[count:], read[count:]
74 i := bytes.IndexByte(read, 0x1b)
76 if i == -1 || i+1 >= len(read) {
77 copy(write, read)
82 if read[i+1] != '[' {
83 write, read = advance(write, read, i+1)
88 write, read = advance(write, read, i)
91 i = bytes.IndexFunc(read, func(r rune) bool {
96 i = len(read) - 1
103 read = read[i:]