string-join 0.1.2

A python-like way to join items in an iterator with a separator
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented1 out of 7 items with examples
  • Size
  • Source code size: 45.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pwoolcoc

= String join

A helper trait for joining an iterator by a string-like thing using a python-like syntax

== Usage


use string_join::Join

"=>".join(["a", "b"].iter().cycle().take(5)); // => "a=>b=>a=>b=>a" " ".join(&["a", "b", "c"]); // => "a b c"

let mut f = File::write("foo.txt").unwrap(); "\n".write_join(&mut f, &["a", "b", "c"]); // std::io::Result<5> (writes joined string to writer and returns a result // with either the number of bytes written, or a std::io::Error