替换子串

基本类型 / 字符串

startString = "3, 2, 1, go!"
startString = startString
    .sub("1", "one")
    .sub("2", "two")
    .sub("3", "three")
# startString = "three, two, one, go!"

puts "startString is \"#{startString}\""