Ruby:Convert a String to a Number

From Progzoo

You can use String methods to_i or to_f to convert to integers or floating point numbers.

The value "1234" is a string, you need to treat it as a number - to add 1, giving 1235.

[Font] [Default] [Show] [Resize] [History] [Profile]