Comment #0 by bearophile_hugs — 2013-07-16T16:12:56Z
If I save this program on Windows (with the typical newlines used on Windows):
import std.stdio: writeln;
import std.string: outdent;
string foo() /*pure nothrow*/ {
return q{
first line
second line
third line
}.outdent;
}
void main() {
writeln(foo());
}
It outputs double newlines:
first line
second line
third line
Also std.string.outdent() is not pure nor nothrow.
Comment #1 by robert.schadek — 2024-12-01T16:18:19Z