Mega Code Archive
Categories
/
Ruby
/
String
To convert a string into a float, use the to_f method
"200".class # => String "200".to_f # => 200.0 "200".to_f.class # => Float