[racket] read text file

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Dec 6 23:35:54 EST 2010

Three minutes ago, prad wrote:
> On Mon, 6 Dec 2010 19:48:14 -0700
> Jay McCarthy <jay.mccarthy at gmail.com>
> wrote:
> > Try file->string
> >
> thx jay and sam!
> file->string works very nicely for what i'm doing, but i'll check the
> read-all out later.  interesting that now i have so many options! :D

Just to give you yet another option: if the intention is to grab some
chunk of random data, you'll want to use `file->bytes' to get a byte
string rather than a string.  Otherwise things may get broken in
confusing ways.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.