redirect std out to a string?

Dukc ajieskola at gmail.com
Thu May 21 15:28:00 UTC 2020


On Thursday, 21 May 2020 at 04:29:30 UTC, Kaitlyn Emmons wrote:
> is there a way to redirect std out to a string or a buffer 
> without using a temp file?

If you want to do the redirection at startup, it's possible. Have 
an another program to start your program by std.process functions 
and redirect stdout to a pipe. The outer program can then handle 
the output of the inner program however it wishes. Clumsy but 
possible.

But I don't know whether a process can redirect it's own standard 
input or output.


More information about the Digitalmars-d-learn mailing list