csv2.cr 
A monkey patch for CSV(stdlib) to provide quote_always in CSV.build.
Since this is a temporary repository before merging PR, we simply name CSV2.
https://github.com/crystal-lang/crystal/pull/6723
- crystal: 0.26.1
Installation
Add this to your application's shard.yml:
dependencies:
csv2:
github: maiha/csv2.cr
version: 0.2.0
Usage
puts CSV2.build {|csv| csv.row 1, ","}
puts CSV2.build(quoting: CSV2::Builder::Quoting::NONE) {|csv| csv.row 1, ","}
puts CSV2.build(quoting: CSV2::Builder::Quoting::RFC ) {|csv| csv.row 1, ","}
puts CSV2.build(quoting: CSV2::Builder::Quoting::ALL ) {|csv| csv.row 1, ","}
1,","
1,,
1,","
"1",","
Contributing
- Fork it (https://github.com/maiha/csv2.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- maiha maiha - creator, maintainer