Macro rglua::try_rstr [−][src]
macro_rules! try_rstr {
($cstring : expr) => { ... };
}Expand description
Tries to convert a const char* to an &str
Examples
use rglua::prelude::*;
let cstr = cstr!("Hello World");
let rstr = try_rstr!(cstr);
assert!(rstr.is_ok()); // Should be perfectly valid to convert to utf8