Latest 1.0
Homepage https://github.com/jsloop42/JSCSVParser
License MIT
Platforms osx 10.9, ios 8.0
Dependencies JSLogger
Authors

CSVParser

A simple CSV parser written in Swift that implements RFC 4180. It reads and parses data efficiently line by line so that it can work with large files.

Usage

  1. Install using Cocopoads
pod 'JSCSVParser'
  1. Import the module and create an instance
import JSCSVParser
let parser = CSVParser()
  1. Set the full file path in the parser
parser.setFilePath(path: path)
  1. Parse each line until the end of file is reached
var tokens: [[String]] = []
while parser.hasNext() {
    tokens.append(parser.parseNext())
}

tokens will contain each comma separated word for each line in an array.

For more details, please check the test cases.

Latest podspec

{
    "name": "JSCSVParser",
    "version": "1.0",
    "license": "MIT",
    "summary": "An efficient CSV parser implementing RFC 4180",
    "homepage": "https://github.com/jsloop42/JSCSVParser",
    "authors": {
        "jsloop": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jsloop42/JSCSVParser.git",
        "tag": "1.0"
    },
    "documentation_url": "https://github.com/jsloop42/JSCSVParser",
    "platforms": {
        "osx": "10.9",
        "ios": "8.0"
    },
    "source_files": "CSVParser/*.swift",
    "swift_version": "4.2",
    "dependencies": {
        "JSLogger": []
    }
}

Pin It on Pinterest

Share This