#concatenation

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

#286 in Rust patterns

Download history 570/week @ 2022-06-03 521/week @ 2022-06-10 378/week @ 2022-06-17 563/week @ 2022-06-24 681/week @ 2022-07-01 365/week @ 2022-07-08 428/week @ 2022-07-15 612/week @ 2022-07-22 487/week @ 2022-07-29 656/week @ 2022-08-05 622/week @ 2022-08-12 670/week @ 2022-08-19 588/week @ 2022-08-26 532/week @ 2022-09-02 700/week @ 2022-09-09 1011/week @ 2022-09-16

2,991 downloads per month
Used in 15 crates (9 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