use-csv 0.1.0

Lightweight CSV delimiter, row, and field helpers for RustUse
Documentation
  • Coverage
  • 66.67%
    10 out of 15 items documented1 out of 10 items with examples
  • Size
  • Source code size: 8.73 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 402.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-csv

Practical CSV utility primitives for lightweight delimiter detection, field escaping, and row splitting.

Warning: versions below 0.3.0 are experimental and may change as the crate matures.

Example Usage

use use_csv::{csv_join_row, detect_delimiter, parse_csv_basic, split_csv_line_basic};

let rows = parse_csv_basic("name,enabled\nRustUse,true\n");

assert_eq!(detect_delimiter("name;enabled\nRustUse;true\n"), Some(';'));
assert_eq!(split_csv_line_basic("a,\"b,c\",d"), vec!["a", "b,c", "d"]);
assert_eq!(rows[1].fields[0], "RustUse");
assert_eq!(csv_join_row(&["one", "two,three"]), "one,\"two,three\"");

Scope

  • common delimiter detection for comma, tab, semicolon, and pipe separated data
  • conservative quoted-field splitting
  • lightweight row parsing for fixtures, CLIs, docs, and config helpers

Non-Goals

  • full RFC 4180 support
  • streaming CSV parsing
  • encoding detection

License

Licensed under either of the following, at your option:

  • MIT License
  • Apache License, Version 2.0