Re: Decompose string into list
- To: mathgroup at smc.vnet.net
- Subject: [mg64098] Re: Decompose string into list
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Wed, 1 Feb 2006 04:34:33 -0500 (EST)
- References: <drn0nb$keo$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Renan wrote:
> Hello,
>
> I can make a string from a list, using:
>
> In[1]:= StringJoin @@ {"F", "o", "o", " ", "b", "a", "r"}
> Out[1]:= Foo bar
>
> But I want to "decompose" a string into a list composed by its elements, e.g.
>
> "Foo bar" turns back into {"F", "o", "o", " ", "b", "a", "r"}
> "Hello" turns back into {"H","e","l","l","o"}.
>
> How to do this? Mathematica 5.2 on Windows.
>
> Thanks!
>
Use the Characters function!
David Bailey
http://www.dbaileyconsultancy.co.uk