From: seebs@... (Peter Seebach) Date: 2007-04-30T11:08:56+09:00 Subject: Re: Swapping characters in a string In message , "Michael W. Ryder" wri tes: >Is there any way in Ruby, short of stepping through a string character >by character, to swap two characters? For example, if I want to replace >all of the commas with periods and periods with commas. Shouldn't String#tr do it? foo.tr!(',.', '.,') -s