Crate proc_strarray

Source
Expand description

Collection of procedural macros for str and bytestr operations.

  1. generate const u8 array from str or bytestr literal
  2. repeat str or bytestr literal
  3. repeat str or bytestr literal as byte slice
  4. get length of str or bytestr literal
  5. generate byte slice from str or bytestr literal

Macros have 0 variant which terminates str or bytestr literal with \0

Macrosยง

str_array
Procedural macro proc_strarray::str_array! creates const u8 array from str or byte str literal.
str_array0
Procedural macro proc_strarray::str_array0! creates zero terminated const u8 array from str or byte str literal.
str_bytes
Convert string or bytestring literals to byte slice.
str_bytes0
Convert string or byte string literals to zero terminated byte slice.
str_len
Procedural macro proc_strarray::str_len! returns length of str or byte str literal.
str_len0
Procedural macro proc_strarray::str_len0! returns length of zero terminated str or byte str literal.
str_repeat
Procedural macro proc_strarray::str_repeat! repeats str or byte str literal n times.
str_repeat0
Procedural macro proc_strarray::str_repeat0! repeats str or bytestr literal n times and adds zero termination.
str_repeat_bytes
Procedural macro proc_strarray::str_repeat_bytes! repeats str or byte str literal as byte slice.
str_repeat_bytes0
Procedural macro proc_strarray::str_repeat_bytes0! repeats str or byte str literal as byte slice with added \0.