Check if the character at the specified position is a line break.
(b []byte, i int)
| 122 | |
| 123 | // Check if the character at the specified position is a line break. |
| 124 | func is_break(b []byte, i int) bool { |
| 125 | return (b[i] == '\r' || // CR (#xD) |
| 126 | b[i] == '\n' || // LF (#xA) |
| 127 | b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) |
| 128 | b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) |
| 129 | b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) |
| 130 | } |
| 131 | |
| 132 | func is_crlf(b []byte, i int) bool { |
| 133 | return b[i] == '\r' && b[i+1] == '\n' |
no outgoing calls
no test coverage detected