#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

#1335 in Rust patterns

Download history 2901/week @ 2024-11-17 3480/week @ 2024-11-24 3753/week @ 2024-12-01 3344/week @ 2024-12-08 2992/week @ 2024-12-15 2395/week @ 2024-12-22 2248/week @ 2024-12-29 3483/week @ 2025-01-05 3706/week @ 2025-01-12 3361/week @ 2025-01-19 2701/week @ 2025-01-26 3997/week @ 2025-02-02 3445/week @ 2025-02-09 3440/week @ 2025-02-16 3650/week @ 2025-02-23 2983/week @ 2025-03-02

13,938 downloads per month
Used in 92 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