Removes a character from this buffer. If the given position if greater than the length of the buffer, this function does nothing.
(&mut self, pos: usize)
| 84 | /// |
| 85 | /// If the given position if greater than the length of the buffer, this function does nothing. |
| 86 | pub fn remove(&mut self, pos: usize) { |
| 87 | self.line = self.line.chars().take(pos).chain(self.line.chars().skip(pos + 1)).collect(); |
| 88 | } |
| 89 | |
| 90 | /// Inserts a char at the given position. |
| 91 | /// |