next method from Integer. : next « String « Ruby






next method from Integer.


# (The Date, Generator, Integer, and String classes all have next methods.)

# You can even use a character code via chr with next:

120.chr # => "x"
120.chr.next # => "y"

 








Related examples in the same category

1.Call next function from string class
2.string.next adds a character when it reaches a boundary, or adds a digit or decimal place when appropriate
3.Call next function on returning result from reverse
4.string.next is based on the character set in use
5.Chain calls of next together
6.next works for numbers represented as strings
7.number.next