On Thursday, 1 February 2018 at 21:42:33 UTC, Steven
Schveighoffer wrote:
On 2/1/18 4:36 PM, Jerry Ferris wrote:
Hello,
I'm developing a program that will either receive data from
stdin or a file, and pass it along to a function for
processing. I want to place this data into a buffer so there
only has to be one version of the function. However, since I'm
new to D, I'm unsure how to go about this in the most
idiomatic way.
https://dlang.org/phobos/std_file.html#read
Then cast to ubyte[].
There's also always std.string.representation which imho looks
nicer then the cast:
https://dlang.org/library/std/string/representation.html