mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 10:10:33 +02:00
Add `c_str!`, which is a convenience macro that creates a new `CStr`
from a string literal.
It is designed to be similar to a `str` in usage, and it is usable
in const contexts, for instance:
const X: &CStr = c_str!("Example");
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Gary Guo <gary@garyguo.net>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
|
||
|---|---|---|
| .. | ||
| allocator.rs | ||
| error.rs | ||
| lib.rs | ||
| prelude.rs | ||
| print.rs | ||
| str.rs | ||