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;
}
Authors:
  • Andrea Manzini
Dependencies:
none
Versions:
0.0.1 2021-Jan-25
~main 2021-Jan-25
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.0
Short URL:
fileinput-d.dub.pm