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

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

Example:

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