(&self, n: usize)
| 33 | /// Returns 0 (NUL) if past end — this maps to EOF in the CSS spec. |
| 34 | #[inline(always)] |
| 35 | fn peek_byte(&self, n: usize) -> u8 { |
| 36 | let idx = self.pos + n; |
| 37 | if idx < self.bytes.len() { |
| 38 | // SAFETY: we just checked bounds |
| 39 | unsafe { *self.bytes.get_unchecked(idx) } |
| 40 | } else { |
| 41 | 0 |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | /// Peek the next char (decoding UTF-8 if needed). Returns EOF ('\0') if at end. |
| 46 | #[inline(always)] |
no test coverage detected