Is there a standard method in Ruby to prepend and/or append a string onto each of an array of strings?
listOfnames = [ 'john', 'dave', 'joe' ];
mrNames = prependToAll('Mr. ', list of names);
resulting in [ 'Mr. john', 'Mr. dave', 'Mr. joe' ]
Is there a version to do so in place?
Or is there a standard way for some easy each
to replace array entries in the array being iterated over?