botp
9/5/2008 12:20:00 PM
On Fri, Sep 5, 2008 at 6:04 PM, Pepe Sanchez <jsnit@jsnit.com> wrote:
> I would like to read all the characters in a string. For example
> "123456" I need to read every digit separately.
> "1234".each_char{|x| p x}
"1"
"2"
"3"
"4"
=> "1234"
> "1234".each_char.map
=> ["1", "2", "3", "4"]