Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csvRange;
- import std.file;
- void main() {
- auto data = readText("sample.csv");
- auto records = csvStructRange!Layout(csvFile(data, ','), ["a", "b", "c", "d", "e"]);
- foreach(r; records)
- {
- }
- }
- struct Layout {
- string a;
- string b;
- int c;
- string d;
- float e;
- }
Add Comment
Please, Sign In to add comment