Splits the buffer in two parts at the position `at`. Returns the remaining part of the buffer (same behavior as `String::split_off`).
(&mut self, at: usize)
| 128 | /// |
| 129 | /// Returns the remaining part of the buffer (same behavior as `String::split_off`). |
| 130 | pub fn split_off(&mut self, at: usize) -> LineBuffer { |
| 131 | let ret = LineBuffer::from(self.line.chars().skip(at).collect::<String>()); |
| 132 | self.line = self.line.chars().take(at).collect(); |
| 133 | ret |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | impl From<&str> for LineBuffer { |