std.stream.OutputStream

Janice Caron caron800 at googlemail.com
Sat Apr 26 04:56:22 PDT 2008


On 26/04/2008, terranium <spam at here.lot> wrote:
> OutputStream has writeStringW and printf methods, but in what encoding characters are written to the stream?
>  As I can see there is no division to *byte* streams and *text* writers as in .Net.

I don't know for sure, but I suspect that the implementation probably
just writes without validating, so you could probably get away with
just casting a ubyte array to to a char array.

That said, std.stream is antiquated. I believe it was one of the
earliest Phobos libraries, and I suspect it was written largely to
avoid dependency on C functions. Phobos streams are long overdue for a
revamp, and that may well happen sooner rather than later.



More information about the Digitalmars-d mailing list