devela::_dep::const_str

Macro to_char_array

macro_rules! to_char_array {
    ($s: expr) => { ... };
}
Available on crate feature dep_const_str only.
Expand description

Converts a string slice into an array of its characters.

ยงExamples

const CHARS: [char; 5] = const_str::to_char_array!("Hello");
assert_eq!(CHARS, ['H', 'e', 'l', 'l', 'o']);