Creates an owned `Wtf8Buf` from a borrowed `Wtf8`.
(&self)
| 863 | |
| 864 | /// Creates an owned `Wtf8Buf` from a borrowed `Wtf8`. |
| 865 | pub fn to_wtf8_buf(&self) -> Wtf8Buf { |
| 866 | Wtf8Buf { |
| 867 | bytes: self.bytes.to_vec(), |
| 868 | } |
| 869 | } |
| 870 | |
| 871 | /// Lossily converts the string to UTF-8. |
| 872 | /// Returns a UTF-8 `&str` slice if the contents are well-formed in UTF-8. |