(seq []byte)
| 167 | } |
| 168 | |
| 169 | func parseCursorForwardN(seq []byte) (int, bool) { |
| 170 | if len(seq) < 3 || seq[len(seq)-1] != 'C' { |
| 171 | return 0, false |
| 172 | } |
| 173 | params := string(seq[2 : len(seq)-1]) |
| 174 | if params == "" { |
| 175 | return 1, true |
| 176 | } |
| 177 | n, err := strconv.Atoi(params) |
| 178 | if err != nil || n <= 0 { |
| 179 | return 0, false |
| 180 | } |
| 181 | return n, true |
| 182 | } |
| 183 | |
| 184 | // splitOnCRLFRuns splits s at the end of each run of \r and \n characters. |
| 185 | // Each segment includes its trailing CR/LF run. The last segment may have no such run. |
no outgoing calls
no test coverage detected