rust/library/std/src/ffi
Eric Seppanen d5fe4cad5a add CStr::from_bytes_until_nul
This adds a member fn that converts a slice into a CStr; it is intended
to be safer than from_ptr (which is unsafe and may read out of bounds),
and more useful than from_bytes_with_nul (which requires that the caller
already know where the nul byte is).

feature gate: cstr_from_bytes_until_nul

Also add an error type FromBytesUntilNulError for this fn.
2022-03-18 15:46:49 -07:00
..
c_str add CStr::from_bytes_until_nul 2022-03-18 15:46:49 -07:00
os_str std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
c_str.rs add CStr::from_bytes_until_nul 2022-03-18 15:46:49 -07:00
mod.rs Re-export core::ffi types from std::ffi 2022-03-02 13:52:31 -05:00
os_str.rs Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00