(&self, str: &'a str)
| 63 | |
| 64 | #[inline(always)] |
| 65 | pub fn str_slice<'a>(&self, str: &'a str) -> &'a str { |
| 66 | debug_assert!( |
| 67 | str.len() >= (self.end_offset().0 as usize), |
| 68 | "attempted to index out of bounds ({} < {})", |
| 69 | str.len(), |
| 70 | self.end_offset().0 |
| 71 | ); |
| 72 | &str[(self.offset().0 as usize)..(self.end_offset().0 as usize)] |
| 73 | } |
| 74 | |
| 75 | pub fn with_quotes(&self, quote_style: QuoteStyle) -> Self { |
| 76 | if *self == quote_style || *self != Kind::String { |