#slice #string #format-string #concatenation #owned #macro #concatenating

concat-string

Provides macros for concatenating string slices into owned strings

2 stable releases

Uses old Rust 2015

1.0.1 Jul 1, 2018
1.0.0 Sep 28, 2017

#1099 in Rust patterns

Download history 2716/week @ 2024-08-22 2345/week @ 2024-08-29 2841/week @ 2024-09-05 2401/week @ 2024-09-12 2394/week @ 2024-09-19 2534/week @ 2024-09-26 2273/week @ 2024-10-03 2698/week @ 2024-10-10 2473/week @ 2024-10-17 2439/week @ 2024-10-24 3054/week @ 2024-10-31 3028/week @ 2024-11-07 3083/week @ 2024-11-14 2957/week @ 2024-11-21 3847/week @ 2024-11-28 3125/week @ 2024-12-05

13,448 downloads per month
Used in 91 crates (16 directly)

Apache-2.0 OR MIT

8KB
51 lines

concat-string

Travis CI AppVeyor Crates.io Docs.rs

This crate provides the concat_string! macro for efficiently concatenating string slices into owned strings. concat_string! accepts any number of arguments that implement AsRef<str> and creates a String with the appropriate capacity, without the need for format strings and their associated runtime overhead.

Example

#[macro_use(concat_string)]
extern crate concat_string;

fn main() {
    println!("{}", concat_string!("Hello", String::from(" "), "world"));
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps