Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
10
Task/CSV-data-manipulation/D/csv-data-manipulation.d
Normal file
10
Task/CSV-data-manipulation/D/csv-data-manipulation.d
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
void main() {
|
||||
import std.stdio, std.csv, std.file, std.typecons, std.array,
|
||||
std.algorithm, std.conv, std.range;
|
||||
|
||||
auto rows = "csv_data_in.csv".File.byLine;
|
||||
auto fout = "csv_data_out.csv".File("w");
|
||||
fout.writeln(rows.front);
|
||||
fout.writef("%(%(%d,%)\n%)", rows.dropOne
|
||||
.map!(r => r.csvReader!int.front.map!(x => x + 1)));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue