Macro noak::mutf8

source ·
macro_rules! mutf8 {
    ($s:literal) => { ... };
}
Expand description

Declares a modified UTF-8 literal.

The input has to be a either a string literal or a byte string literal.

  • A string literal is converted from UTF-8 to modified UTF-8.
  • A byte string literal is assumed to be valid modified UTF-8.
use noak::{mutf8, MStr};

const HELLO_WORLD: &MStr = mutf8!("Hello World!");