Simple types / Strings

# to Int
strNumber = "42"
number = strNumber.to_i

# to Float
strPi = "3.14"
piFloat = strPi.to_f

# the second method
strHalf = "0,5"
half = strHalf.sub(","".").to_f

puts "number is #{number}"
puts "piFloat is #{piFloat}"
puts "half is #{half}"