From 0146cc8e4dc45619a63c012c2b1befbbb6bf969d Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Tue, 28 Jul 2015 16:55:16 +0200 Subject: [PATCH] Add docs for read-str --- docs/language/core.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/language/core.rst b/docs/language/core.rst index 077907a..297e137 100644 --- a/docs/language/core.rst +++ b/docs/language/core.rst @@ -1065,6 +1065,21 @@ if *from-file* ends before a complete expression can be parsed. hyfriends! EOF! +read-str +-------- + +Usage: ``(read "string")`` + +This is essentially a wrapper around `read` which reads expressions from a +string: + +.. code-block:: hy + + => (read-str "(print 1)") + (u'print' 1L) + => (eval (read-str "(print 1)")) + 1 + => .. _remove-fn: