Copies a nul-terminated C string into memory.
(&self, store: &mut Store, offset: usize, string: &CString)
| 278 | |
| 279 | /// Copies a nul-terminated C string into memory. |
| 280 | pub fn write_cstring(&self, store: &mut Store, offset: usize, string: &CString) -> Result<()> { |
| 281 | self.copy_from_slice(store, offset, string.as_bytes_with_nul()) |
| 282 | } |
| 283 | |
| 284 | /// Copies a UTF-8 string into memory and appends a trailing nul byte. |
| 285 | pub fn write_cstring_bytes(&self, store: &mut Store, offset: usize, string: &str) -> Result<()> { |
nothing calls this directly
no test coverage detected