Project

hopcsv

0.0
No commit activity in last 3 years
No release in over 3 years
A pure-C CSV parser for HOPSA. Based on Ccsv project. Works fast and efficient. Based on ccsv by Evan Weaver
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Hopcsv

A pure-C CSV parser.

Installation¶ ↑

gem install hopcsv

Usage¶ ↑

require 'rubygems'
require 'hopcsv'

Hopcsv.foreach("data.csv") do |line|
  # Do something with the line array
end

Hopcsv.foreach("/etc/passwd",":") do |line|
  puts line[0]
end

Advanced usage¶ ↑

Get users from passwd file, with UIDs between 1000 and 1010 and between 2000 and 2010. Works with numbers only! Third argument is column index, then one or more intervals.

Hopcsv.foreach("/etc/passwd",":",2,[1000..1010],[2000..2010]) do |line|
  puts line[0]
end

Contacts¶ ↑

Forks, pull-requests and other contacts via guthub: https://github.com/zhum/hopcsv

License¶ ↑

Copyright 2012 Sergey Zhumatiy

Copyright 2007-2012 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.