From 7792db48f485a4190d3303d7b3b7ac1422933bfd Mon Sep 17 00:00:00 2001 From: interp Date: Sun, 12 May 2002 05:52:57 +0000 Subject: [PATCH] added example to parse-userhost / unparse->string --- doc/latex/url.tex | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/latex/url.tex b/doc/latex/url.tex index 7c40363..15bed1e 100644 --- a/doc/latex/url.tex +++ b/doc/latex/url.tex @@ -51,8 +51,23 @@ only the parsing of http URLs is implemented. \ex{userhost->string} just does the inverse job: it unparses \semvar{userhost-record} into a string. The elements of the record - are escaped before the are put together. - + are escaped before the are put together. + + Example: + \begin{code} +> (define default + (make-userhost + "andreas" "se ret" "www.sf.net" "80")) +> (userhost->string default) +"andreas:se\%20ret@www.sf.net:80" +> (parse-userhost + '("" "" "foo\%20bar@www.scsh.net" "docu" "index.html") + default) +'#{userhost} +> (userhost->string ##) +"foo\%20bar:se\%20ret@www.scsh.net:80" +\end{code} + For details about escaping and unescaping see section ``Handle URIs'' at page \pageref{sec:uri}. \end{defundescx}