splitting up all the individual values and converting them into elements : Convert to Array « String « Ruby






splitting up all the individual values and converting them into elements


puts "0123456789".split( // ) # => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]


                           

 

Related examples in the same category

1.From a String to an Array
2.regular expression matches a comma and a space (/, /)