Mega Code Archive

 
Categories / Ruby / String
 

String next adds a character when it reaches a boundary, or adds a digit or decimal place when appropriate

puts "z".next puts "zzzz".next puts "999.0".next puts "999".next