https://github.com/hougesen/csvvy
a quick and dirty csv parser
https://github.com/hougesen/csvvy
csv
Last synced: about 2 months ago
JSON representation
a quick and dirty csv parser
- Host: GitHub
- URL: https://github.com/hougesen/csvvy
- Owner: hougesen
- License: mit
- Created: 2023-12-25T23:51:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-02T20:42:29.000Z (7 months ago)
- Last Synced: 2025-10-11T20:03:49.660Z (6 months ago)
- Topics: csv
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csvvy
csvvy is a very simple csv parser that you most likely shouldn't use.
If you for some _weird_ reason want to use it; it should be pretty straightforward:
```rust
fn do_something() {
let input = "
name, height, weight
Mads, 174, 62.5
Oliver, 195, 86.1
Tobias, 182, 90
Casper, 170, 56
";
let separator = ',';
let rows: Vec> =
csvvy::parse_csv(&input, separator);
for row in rows {
match row.get("height") {
Some(CsvValue::Float(num)) => {
// Do something
}
Some(CsvValue::Integer(num)) => {
// Do something else
}
Some(CsvValue::Text(_)) | None => {
// ignore
}
};
}
}
```