Extracts a range of characters from this buffer.
(&self, start_pos: usize, end_pos: usize)
| 64 | |
| 65 | /// Extracts a range of characters from this buffer. |
| 66 | pub fn range(&self, start_pos: usize, end_pos: usize) -> String { |
| 67 | let count = end_pos.saturating_sub(start_pos); |
| 68 | self.chars().skip(start_pos).take(count).collect() |
| 69 | } |
| 70 | |
| 71 | /// Checks if this buffer is empty or not. |
| 72 | pub fn is_empty(&self) -> bool { |
no test coverage detected