Macro const_str::as_bytes[][src]

macro_rules! as_bytes {
    ($str:literal) => { ... };
}

Converts a string literal to a byte string literal

Examples

let bytes: &'static [u8;4] = const_str::as_bytes!("file");
assert_eq!(bytes, b"file");