rstr

Macro rstr 

Source
macro_rules! rstr {
    ($cstring:expr) => { ... };
}
Expand description

Tries to convert a const char* to a &str Will panic if the const char* is not valid utf-8

ยงExamples

use rglua::prelude::*;
let cstr = cstr!("Hello World");
let rust_str = rstr!(cstr);
assert_eq!(rust_str, "Hello World");