CSV解析器封装SwiftCSV.zip
SwiftCSV是CSV解析器封装。
用法:
id,name,age 1,Alice,18 2,Bob,19 3,Charlie,20
访问行和列的数据:
let csvURL = NSURL(string: "users.csv")
let csv = CSV(contentsOfURL: url)
// Rows let rows = csv.rows let headers = csv.headers
//=> ["id", "name", "age"] let alice = csv.rows[0]
//=> ["id": 1, "name": "Alice"
用户评论