Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

turn an array of string into integer in ruby

> ["", "22", "14", "18"].map(&:to_i)
# Result: [0, 22, 14, 18]
 
PREVIOUS NEXT
Tagged: #turn #array #string #integer #ruby
ADD COMMENT
Topic
Name
9+9 =