Or you can use `display-to-file' (here too look at the keyword arguments): http://docs.racket-lang.org/reference/Filesystem.html?q=display-lines-to-file#%28def._%28%28lib._racket%2Ffile..rkt%29._display-to-file%29%29
If you have a list of strings instead of a single string, you can also use `display-lines-to-file': http://docs.racket-lang.org/reference/Filesystem.html?q=display-lines-to-file#%28def._%28%28lib._racket%2Ffile..rkt%29._display-lines-to-file%29%29 It is the 'inverse' function of `file->lines'. Laurent On Mon, Apr 22, 2013 at 1:51 PM, Jos Koot <jos.k...@gmail.com> wrote: > ** > You already have the file, isn't it? > If you want to convert the string to a new file, open it with the > appropriate #:exists keyword argument and write. > If you want an input string, use open-input-string. > Jos > > ------------------------------ > *From:* users-boun...@racket-lang.org [mailto: > users-boun...@racket-lang.org] *On Behalf Of *deepak verma > *Sent:* viernes, 19 de abril de 2013 16:47 > *To:* users > *Subject:* [racket] string to file > > if we convert a file into a string using file->string > how do we get back the file? > > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users