(&mut self, idx: usize, w: &Wtf8)
| 514 | /// Inserts a WTF-8 slice into this `Wtf8Buf` at a byte position. |
| 515 | #[inline] |
| 516 | pub fn insert_wtf8(&mut self, idx: usize, w: &Wtf8) { |
| 517 | assert!(is_code_point_boundary(self, idx)); |
| 518 | |
| 519 | self.bytes.insert_str(idx, w) |
| 520 | } |
| 521 | |
| 522 | /// Consumes the WTF-8 string and tries to convert it to a vec of bytes. |
| 523 | #[inline] |