Macro phper_macros::c_str [−][src]
c_str!() { /* proc-macro */ }
Expand description
C style string end with ‘\0’.
Examples
use std::ffi::CStr;
assert_eq!(c_str!("foo"), unsafe {
CStr::from_ptr("foo\0".as_ptr().cast())
});
c_str!() { /* proc-macro */ }
C style string end with ‘\0’.
use std::ffi::CStr;
assert_eq!(c_str!("foo"), unsafe {
CStr::from_ptr("foo\0".as_ptr().cast())
});