logo
macro_rules! s2u {
    ($s:expr) => { ... };
}
Expand description

Rust string to UTF-8 conversion. See also utf::u2s.

Example:

let cstr = s2u!("hello"); // ffi::CString
libc::printf("%hs", cstr.as_ptr());