From: Fei Xia
Subject: how to get x12 from the string "x12"?
Date: 
Message-ID: <4l3av0$9o6@netnews.upenn.edu>
I have a quick question. Is there any way to get the content of a string?
for example, (some-function "x12") will return x12. some-function is
what I am looking for.


Thanks in advance.

-Fei

From: Eric Lavarde
Subject: Re: how to get x12 from the string "x12"?
Date: 
Message-ID: <31764DF9.1799@hpbbrd.hp.com>
Fei Xia wrote:
> 
> I have a quick question. Is there any way to get the content of a string?
> for example, (some-function "x12") will return x12. some-function is
> what I am looking for.
> 
> Thanks in advance.
> 
> -Fei
read-from-string ?
-- 
***    If you're interested in Europe, ask me what AEGEE is.     ***

Freiburger Allee 65 * D-71034 B<oe>blingen * Tel: +49-7031/289094
		(<oe> means 'o' with 2 points above it)
HP: ·····@hpbbrd.hp.com
    Tel: +49-7031/14-4405		Fax: +49-7031/14-2049

***     Ne en France, Studium in Deutschland, being European.    ***
From: Luca Pisati
Subject: Re: how to get x12 from the string "x12"?
Date: 
Message-ID: <317B12B4.794B@nichimen.com>
Fei Xia wrote:
> 
> I have a quick question. Is there any way to get the content of a string?
> for example, (some-function "x12") will return x12. some-function is
> what I am looking for.
> 
> Thanks in advance.
> 
> -Fei

If what you are interested is the symbol X12, then you'll do:

(with-input-from-string (s "x12") (read s))

In any case, any string can be treated as a stream, using

with-input-from-string or with-output-to-string

Once you have this binding any I/O function will work on it.

-- 
Luca Pisati              Nichimen Graphics Inc.
12555 West Jefferson Blvd. Suite 285, Los Angeles, CA 90066
Phone: (310) 577-0500; Fax: (310) 577-0577  ······@nichimen.com (internet)