#low-overhead #string #manner #macro #alloc #apps #together

deprecated string_concat

A useful macro for concatenating strings in low overhead manner

2 releases

0.0.1 May 19, 2020
0.0.0 May 19, 2020

#11 in #manner

Download history 421/week @ 2023-12-06 492/week @ 2023-12-13 446/week @ 2023-12-20 466/week @ 2023-12-27 373/week @ 2024-01-03 388/week @ 2024-01-10 930/week @ 2024-01-17 333/week @ 2024-01-24 569/week @ 2024-01-31 324/week @ 2024-02-07 327/week @ 2024-02-14 552/week @ 2024-02-21 695/week @ 2024-02-28 546/week @ 2024-03-06 384/week @ 2024-03-13 653/week @ 2024-03-20

2,374 downloads per month
Used in 8 crates (4 directly)

MIT/Apache

6KB
52 lines

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

No runtime deps