reading in text files

Jesse Phillips jessekphillips+D at gmail.com
Wed Aug 24 11:06:37 PDT 2011


Brian Brady Wrote:

> but it just hangs there, not doing anything(for a considerable time) so I am
> assuming I am doing something wrong. There isn't any actual mention in the
> book of *how* reading in the text file should be accomplished, so what is the
> best way to do this?

Now that you know how to use the program, here is the answer to your question.

auto content = std.file.readText("filename");

There are other functions depending on use case but this is most common.


More information about the Digitalmars-d-learn mailing list