(s: &[u8])
| 137 | /* Regular string prefix: r, R, u, U. The b/B variants live in `is_bytes_prefix` to emit a distinct `Bytes` token. */ |
| 138 | #[inline] |
| 139 | pub fn is_string_prefix(s: &[u8]) -> bool { |
| 140 | match s.len() { |
| 141 | 1 => matches!(s[0], b'r' | b'R' | b'u' | b'U'), |
| 142 | _ => false, |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | /* Bytes literal prefix: b, B, br, Br, bR, BR, rb, Rb, rB, RB. Emitted as `Bytes` so the parser produces `Value::Bytes`. */ |
| 147 | #[inline] |