3 releases

Uses old Rust 2015

0.1.3 Jan 9, 2019
0.1.2 Jan 9, 2019
0.1.1 Aug 28, 2018
0.1.0 Aug 28, 2018

#2058 in Rust patterns

Download history 15/week @ 2024-09-22

218 downloads per month

MIT/Apache

7KB
66 lines

join

Build Status Crates.io API reference

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)");
}

No runtime deps