[−][src]Function format_xml::spaced_comma_set
pub fn spaced_comma_set<I: IntoIterator>(
iterable: I
) -> SpacedSet<impl Clone + Iterator<Item = CommaFmt<I::Item>>> where
I::IntoIter: Clone,
Formats an iterable with spaces of comma formatted items.
let data = [(1.0, 2.0), (13.0, 42.0), (-5.0, 100.0)]; let result = format_xml::xml! { <polygon points={format_xml::spaced_comma_set(data.iter().cloned())} /> }.to_string(); assert_eq!(result, r#"<polygon points="1,2 13,42 -5,100 " />"#);