Line gaps with text files
Joel
joelcnz at gmail.com
Sat Feb 9 17:43:25 PST 2013
I'm using Windows and get gaps (blank lines) when using readText
and std.stdio.write.
import std.stdio;
import std.file;
void main() {
string s = readText("s.txt");
writeln('[', s, ']');
File("s.txt", "w").write(s);
}
notepad.exe opens alright, (if you don't save as File(.., "wb")).
But I'm having trouble with some others like GtkD. Also writeln
always does it right.
More information about the Digitalmars-d-learn
mailing list