Convert float to string : Convert to String « Number « Ruby






Convert float to string

(256.0).to_s # => "256.0"

 








Related examples in the same category

1.Integer passed into a string with interpolation
2.Substituting Variables Into Strings
3.constant value interpolation
4.String interpolation with method call
5.String interpolation with calculation
6.Convert integer to string by parameter
7.Convert string to integer with error