Function malachite_base::strings::strings_from_char_vecs
source · pub const fn strings_from_char_vecs<I: Iterator<Item = Vec<char>>>(
css: I,
) -> StringsFromCharVecs<I> ⓘ
Expand description
Generates String
s, given an iterator that generates Vec<char>
s.
The elements appear in the same order as they do in the given iterator, but as String
s.
The output length is css.count()
.
§Examples
use itertools::Itertools;
use malachite_base::strings::strings_from_char_vecs;
let ss =
&strings_from_char_vecs([vec!['a', 'b'], vec!['c', 'd']].iter().cloned()).collect_vec();
assert_eq!(
ss.iter().map(|cs| cs.as_str()).collect_vec().as_slice(),
&["ab", "cd"]
);