Crate proc_strarray

Source
Expand description

Collection of procedural macros for str operations.

  1. generate const u8 array from str
  2. repeat string
  3. get length of string

Macros have 0 variant which terminates str literal with \0

Macrosยง

  • Procedural macro proc_strarray::make_array creates const u8 array from str literal.
  • Procedural macro proc_strarray::make_array0 creates zero terminated const u8 array from str literal.
  • Procedural macro proc_strarray::str_len returns length of str literal.
  • Procedural macro proc_strarray::str_len0 returns length of zero terminated str literal.
  • Procedural macro proc_strarray::str_repeat repeats string literal n times.
  • Procedural macro proc_strarray::str_repeat0 repeats string literal n times and adds zero termination.