Crates.io | comma-separated |
lib.rs | comma-separated |
version | 0.1.0 |
source | src |
created_at | 2024-11-28 20:03:24.223902 |
updated_at | 2024-11-28 20:03:24.223902 |
description | Iterator over a comma-seperated string, ignoring any commas inside quotes |
homepage | |
repository | https://github.com/icewind1991/comma-separated |
max_upload_size | |
id | 1464936 |
size | 11,735 |
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<_>>());
}