J
John Pywtorak
9 digits in a string "123456789", convert to individual Fixnums
[1,2,3,4,5,6,7,8,9], or as below
a, b, c, d, e, f, g, h, i = id.scan(/\d/).map(&:to_i)
Simpler yet how about ["1", "2", ...]. Is scan the only direct way?
I tried the "*" mechanism, no such luck, and tried array slicing again
no luck. TIA
[1,2,3,4,5,6,7,8,9], or as below
a, b, c, d, e, f, g, h, i = id.scan(/\d/).map(&:to_i)
Simpler yet how about ["1", "2", ...]. Is scan the only direct way?
I tried the "*" mechanism, no such luck, and tried array slicing again
no luck. TIA