fileinput-d ~main
file input range iterator
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
fileinput-d
A D language implementation of Python's fileinput module
usage
- add to your dub.json:
"dependencies": {
[...other libraries...]
"fileinput-d": ">=0.0.1",
[...other libraries...]
},
in your code:
import fileinput;
import std.stdio;
import std.string : chomp;
void main(in string[] args)
{
foreach (line; fileinput.input(args))
{
writeln(line.chomp); // do something with each line
}
return;
}
- Registered by Andrea Manzini
- ~main released 3 years ago
- ilmanzo/fileinput-d
- MIT
- Copyright © 2021, Andrea Manzini
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.1 2021-Jan-25 ~main 2021-Jan-25 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
6 downloads total
-
- Score:
- 0.1
- Short URL:
- fileinput-d.dub.pm