Latest 0.0.9
Homepage https://github.com/daniel1of1/CSwiftV
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Authors

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.

TL;DR

let inputString = "Year,Make,Model,Description,Pricern1997,Ford,E350,descrition,3000.00rn1999,Chevy,Venture,another description,4900.00rn"

let csv = CSwiftV(with: inputString)

let rows = csv.rows // [
                    //  ["1997","Ford","E350","descrition","3000.00"],
                    //  ["1999","Chevy","Venture","another description","4900.00"]
                    // ]

let headers = csv.headers // ["Year","Make","Model","Description","Price"]

let 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"]
                              // ]

Latest podspec

{
    "name": "CSwiftV",
    "version": "0.0.9",
    "summary": "A swift CSV parser",
    "description": "A csv parser conforming (and tested as much) to [rfc4180](http://tools.ietf.org/html/rfc4180#section-2) i.e the closest thing to a csv spec.",
    "homepage": "https://github.com/daniel1of1/CSwiftV",
    "license": "MIT",
    "authors": {
        "Daniel Haight": "[email protected]"
    },
    "social_media_url": "http://twitter.com/daniel1of1",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "swift_version": "5.0",
    "source": {
        "git": "https://github.com/daniel1of1/CSwiftV.git",
        "tag": "0.0.9"
    },
    "source_files": "Sources/CSwiftV.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This