#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

#1073 in Rust patterns

Download history 2978/week @ 2023-12-04 2485/week @ 2023-12-11 2278/week @ 2023-12-18 2096/week @ 2023-12-25 2138/week @ 2024-01-01 2560/week @ 2024-01-08 2754/week @ 2024-01-15 3403/week @ 2024-01-22 3016/week @ 2024-01-29 2521/week @ 2024-02-05 2350/week @ 2024-02-12 2630/week @ 2024-02-19 2943/week @ 2024-02-26 3482/week @ 2024-03-04 3308/week @ 2024-03-11 3744/week @ 2024-03-18

13,813 downloads per month
Used in 38 crates (15 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