[][src]Macro concat_in_place::strcat

macro_rules! strcat {
    ($input:expr, $($element:expr)*) => { ... };
}

Appends any number of string slices onto a string buffer

use concat_in_place::strcat;

let domain = "domain.com";
let endpoint = "inventory/parts";
let id = "10512";

let mut url = String::new();
let slice = strcat!(&mut url, domain "/" endpoint "/" id);
assert_eq!(slice, "domain.com/inventory/parts/10512");

Implementation Notes

Technically works with any string type that has the following methods:

  • capacity
  • len
  • push_str