v/vlib/encoding/csv
2024-08-05 20:23:39 +03:00
..
csv_reader_random_access.v fmt: fix and simplify align of struct fields (#21995) 2024-08-05 20:23:39 +03:00
csv_reader_sequential.v fmt: fix and simplify align of struct fields (#21995) 2024-08-05 20:23:39 +03:00
csv_reader_test.v encoding.csv: fix bug in RandomAccessReader, spotted on windows with mingw32 (#20571) 2024-01-17 22:10:28 +02:00
reader.v breaking,checker: disallow initializing private struct fields outside structs module (#21183) 2024-04-12 13:53:02 +03:00
reader_test.v all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
README.md
README_csv_reader.md breaking,checker: disallow initializing private struct fields outside structs module (#21183) 2024-04-12 13:53:02 +03:00
to_struct_arr.v all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
utils.v encoding.csv: add a new utility fn new_reader_from_file/2 (#20530) 2024-01-14 19:42:01 +02:00
utils_test.v encoding.csv: add a new utility fn new_reader_from_file/2 (#20530) 2024-01-14 19:42:01 +02:00
writer.v breaking,checker: disallow initializing private struct fields outside structs module (#21183) 2024-04-12 13:53:02 +03:00
writer_test.v

Reader example

import encoding.csv

data := 'x,y\na,b,c\n'
mut parser := csv.new_reader(data)
// read each line
for {
	items := parser.read() or { break }
	println(items)
}

It prints:

['x', 'y']
['a', 'b', 'c']