On Fri, Jul 10, 2009 at 1:22 PM, Colin Law <[email protected]> wrote:

>
> 2009/7/10 Zhao Yi <[email protected]>:
> >
> > I got a string from "text_area_tag". Because the browser working on
> > windows while my rails server working on linux, there is ^M at the end
> > of each line. What I want to do is to remove this character and separate
> > the string to an array. How can I do this?
> >
>
> Can I just check that I understand correctly.  You have a string with
> embedded ^M characters and you wish to turn this into an array of
> strings?  If that is correct then I would suggest looking at
> String#split.
>

Colin, he wants to first remove the ^M from the string.  Then he wants to
split
the string.

-Conrad

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to