Skip to content

Commit

Permalink
Have tolf add terminating newline
Browse files Browse the repository at this point in the history
  • Loading branch information
marler8997 committed Nov 10, 2019
1 parent 2e3b686 commit cdfc5b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tolf.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
/* Replace line endings with LF
*/

import std.file, std.path, std.string;
import std.file, std.path, std.string, std.range;

void main(string[] args)
{
foreach (f; args[1 .. $])
if (f.exists)
f.write(f.readText.lineSplitter.join('\n'));
f.write(f.readText.lineSplitter.chain([""]).join('\n'));
}

0 comments on commit cdfc5b1

Please sign in to comment.