3 releases
Uses old Rust 2015
0.1.3 | Jan 9, 2019 |
---|---|
0.1.2 |
|
0.1.1 | Aug 28, 2018 |
0.1.0 | Aug 28, 2018 |
#2058 in Rust patterns
218 downloads per month
7KB
66 lines
join
Join a list of items to string:
extern crate join_to_string;
use join_to_string::join;
fn main() {
let mut buf = String::new();
join([1, 2, 3].iter())
.separator(", ")
.prefix("(")
.suffix(")")
.to_buf(&mut buf); // .to_string()
assert_eq!(buf, "(1, 2, 3)");
}