proc_strarray

Macro str_len0

Source
str_len0!() { /* proc-macro */ }
Expand description

Procedural macro proc_strarray::str_len0 returns length of zero terminated str literal.

§See also

  • str_len!: returns length of str literal.

§Example

    // This code will create const usize and assign length of supplied string to it.
    use proc_strarray::str_len0;
    const PMD85: usize = str_len0!("PMD-85");
    assert_eq!(PMD85, 7);