2 stable releases
Uses old Rust 2015
1.0.1 | Jul 1, 2018 |
---|---|
1.0.0 | Sep 28, 2017 |
#1043 in Rust patterns
11,503 downloads per month
Used in 87 crates
(17 directly)
8KB
51 lines
concat-string
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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.