non letter string successor : succ « String « Ruby






non letter string successor


s = '!@-'
13.times { puts s = s.succ }
# !@.
# !@/
# !@0
# !@1
# !@2
# ...
# !@8
# !@9
# !@10

 








Related examples in the same category

1.Produce successive string
2.Next value of a string