Is there a way to do the following lazily:
writelnIfNotEmpty(T)(T a){
auto b=text(a);
if(b.length)
writeln(b);
}
ie, without using std.conv.text (which needlessly computes an intermediate string, which could be quite large) or launching a separate process ?
writelnIfNotEmpty(""); //doesn't print new line
writelnIfNotEmpty("a"); //prints "a\n"