Name: CSwiftV
Owner: Simpleweb
Description: A csv parser written in swift conforming to rfc4180
Forked from: Daniel1of1/CSwiftV
Created: 2016-10-07 14:32:31.0
Updated: 2016-10-07 14:32:32.0
Pushed: 2016-12-03 15:56:47.0
Size: 83
Language: Swift
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A csv parser conforming (and tested as much) to rfc4180 i.e the closest thing to a csv spec.
It is currently all in memory so not suitable for very large files.
inputString = "Year,Make,Model,Description,Price\r\n1997,Ford,E350,descrition,3000.00\r\n1999,Chevy,Venture,another description,4900.00\r\n"
csv = CSwiftV(String: inputString)
rows = csv.rows // [
// ["1997","Ford","E350","descrition","3000.00"],
// ["1999","Chevy","Venture","another description","4900.00"]
// ]
headers = csv.headers // ["Year","Make","Model","Description","Price"]
keyedRows = csv.keyedRows // [
// ["Year":"1997","Make":"Ford","Model":"E350","Description":"descrition","Price":"3000.00"],
// ["Year":"1999","Make":"Chevy","Model":"Venture","Description":"another, description","Price":"4900.00"]
// ]