Substitutions : sub « String « Ruby






Substitutions


puts "foobar".sub('bar', 'foo')

 

Related examples in the same category