#concat #concatenation #string #string-manipulation

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

#557 in Rust patterns

Download history 3058/week @ 2023-10-19 3561/week @ 2023-10-26 2782/week @ 2023-11-02 3325/week @ 2023-11-09 3145/week @ 2023-11-16 2698/week @ 2023-11-23 3054/week @ 2023-11-30 2606/week @ 2023-12-07 2554/week @ 2023-12-14 2165/week @ 2023-12-21 2061/week @ 2023-12-28 2585/week @ 2024-01-04 2707/week @ 2024-01-11 2951/week @ 2024-01-18 3200/week @ 2024-01-25 2770/week @ 2024-02-01

12,048 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