Skip to content

Commit daa3802

Browse files
authored
Use new property names in README examples (#88)
1 parent 68f2d07 commit daa3802

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ public enum CSVParseError: Error {
101101

102102
```swift
103103
let csv = CSV(string: "id,name,age\n1,Alice,18\n2,Bob,19")
104-
csv.header //=> ["id", "name", "age"]
105-
csv.rows //=> [["id": "1", "name": "Alice", "age": "18"], ["id": "2", "name": "Bob", "age": "19"]]
106-
csv.columns //=> ["id": ["1", "2"], "name": ["Alice", "Bob"], "age": ["18", "19"]]
104+
csv.header //=> ["id", "name", "age"]
105+
csv.namedRows //=> [["id": "1", "name": "Alice", "age": "18"], ["id": "2", "name": "Bob", "age": "19"]]
106+
csv.namedColumns //=> ["id": ["1", "2"], "name": ["Alice", "Bob"], "age": ["18", "19"]]
107107
```
108108

109109
The rows can also parsed and passed to a block on the fly, reducing the memory needed to store the whole lot in an array:

0 commit comments

Comments
 (0)