Returns the characters from the start of the string to `end_pos`, excluding `end_pos`. Calling this with `end_pos` set to 0 will return an empty string, and a 1-char string if `end_pos` is 1 (if the string contains at least 1 character).
(&self, end_pos: usize)
| 59 | /// Calling this with `end_pos` set to 0 will return an empty string, and a 1-char string if |
| 60 | /// `end_pos` is 1 (if the string contains at least 1 character). |
| 61 | pub fn start(&self, end_pos: usize) -> String { |
| 62 | self.chars().take(end_pos).collect() |
| 63 | } |
| 64 | |
| 65 | /// Extracts a range of characters from this buffer. |
| 66 | pub fn range(&self, start_pos: usize, end_pos: usize) -> String { |