(read-from-string "123") is equivalent to `(call-with-input-string "123" 
read)` while read-from-string-all can be replaced by:

    (define (read-all in)
      (let loop ([result '()])
        (let ((v (read in)))
          (if (eof-object? v)
              (reverse result)
              (loop (cons v result))))))

    > (call-with-input-string "123 456" read-all)
    '(123 456)

although I am not sure it is a good idea to call read on strings received 
from the user...

Alex.
On Wednesday, February 6, 2019 at 6:49:57 PM UTC+8, Laurent Orseau wrote:
>
> read-from-string and read-from-string-all are convenient functions, but 
> they belong to the mzlib/string library, which is deprecated. I can't find 
> an existing replacement in racket/string or racket/base. Is there one with 
> a different name?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to