mirror of
https://codeberg.org/icewind/comma-separated.git
synced 2026-06-03 18:24:05 +02:00
cleanup readme
This commit is contained in:
parent
4df493bd21
commit
6593b51543
1 changed files with 4 additions and 3 deletions
|
|
@ -4,7 +4,8 @@ Iterator over a comma-seperated string, ignoring any commas inside quotes
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use comma_separated::CommaSeparatedIterator;
|
use comma_separated::CommaSeparatedIterator;
|
||||||
fn main() {
|
|
||||||
|
fn main() {
|
||||||
let input = r#"foo, "bar", 'quoted, part'"#;
|
let input = r#"foo, "bar", 'quoted, part'"#;
|
||||||
let iterator = CommaSeparatedIterator::new(input);
|
let iterator = CommaSeparatedIterator::new(input);
|
||||||
assert_eq!(vec!["foo", "\"bar\"", "'quoted, part'"], iterator.collect::<Vec<_>>());
|
assert_eq!(vec!["foo", "\"bar\"", "'quoted, part'"], iterator.collect::<Vec<_>>());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue