initial version

This commit is contained in:
Robin Appelman 2024-11-27 21:04:58 +01:00
commit 3595c0924b
2 changed files with 154 additions and 6 deletions

12
README.md Normal file
View file

@ -0,0 +1,12 @@
# Comma-separated
Iterator over a comma-seperated string, ignoring any commas inside quotes
```rust
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<_>>());
}
```