#low-overhead #string #macro #manner #concatenating #no-std #macro-string

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

#7 in #manner

Download history 1763/week @ 2025-10-13 2593/week @ 2025-10-20 2782/week @ 2025-10-27 2775/week @ 2025-11-03 1976/week @ 2025-11-10 1340/week @ 2025-11-17 1293/week @ 2025-11-24 2317/week @ 2025-12-01 1259/week @ 2025-12-08 1575/week @ 2025-12-15 1116/week @ 2025-12-22 1098/week @ 2025-12-29 1690/week @ 2026-01-05 1526/week @ 2026-01-12 1631/week @ 2026-01-19 1509/week @ 2026-01-26

6,515 downloads per month
Used in 24 crates (6 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