comma-separated

Crates.iocomma-separated
lib.rscomma-separated
version0.1.0
sourcesrc
created_at2024-11-28 20:03:24.223902
updated_at2024-11-28 20:03:24.223902
descriptionIterator over a comma-seperated string, ignoring any commas inside quotes
homepage
repositoryhttps://github.com/icewind1991/comma-separated
max_upload_size
id1464936
size11,735
Robin Appelman (icewind1991)

documentation

README

Comma-separated

Iterator over a comma-seperated string, ignoring any commas inside quotes

use comma_separated::CommaSeparatedIterator;

fn main() {
    let input = r#"foo, "bar", 'quoted, part'"#;
    let iterator = CommaSeparatedIterator::new(input);
    assert_eq!(vec!["foo", "\"bar\"", "'quoted, part'"], iterator.collect::<Vec<_>>());
}
Commit count: 8

cargo fmt