Have tolf add terminating newline

This commit is contained in:
Jonathan Marler 2019-11-09 20:20:04 -07:00
parent 2e3b686601
commit cdfc5b1090

4
tolf.d
View file

@ -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'));
}