While trying to figure out why my reading from & write back to file kept increasing the size of my entries, I figured out File.write always introduces a \r character before any \n characters, even if they are already preceded by one.

Is this intentional behaviour or an oversight?

Example:
```d
module app;
import std.stdio;
import std.file;

void main(string[] args) {
        string a = "`a\r\n\r\nb`\r\n";
        File("test.txt", "w").write(a);
}
```

Content of text.txt:
```
`a\r\r\n\r\r\nb\`\r\r\n
```

Reply via email to