string_concat 0.0.1

A useful macro for concatenating strings in low overhead manner
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 0 items with examples
  • Size
  • Source code size: 14.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 538.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • richardanaya/string_concat
    4 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • richardanaya

string_concat!

A useful macro for putting together strings in a low overhead manner for no_std + alloc apps.

let name = "Richard";
let msg:String = string_concat!("Hello ",name,"!");

saves you from typing

let name = "Richard";
let msg:String = {
  let temp_string = String::new();
  temp_string.push_str("Hello");
  temp_string.push_str(name);
  temp_string.push_str("!");
  temp_string
}

Contributors

  • @richardanaya
  • @RustyYato