From: "David A. Black" Date: 2005-05-06T08:53:08+09:00 Subject: Re: String Manipulation Nuby Question Hi -- On Fri, 6 May 2005, Logan Capaldo wrote: > On 5/5/05, Chris Roos wrote: >> >> I have a Person with title, forename and surname (all of which are >> optional). I want to return a 'pretty' name for this person in the format.. > > "#{title} #{forename} #{surname}".strip Much more succinct than mine :-) You would, however, have to put a .squeeze(" ") in there too, to take out extra spaces in the middle. " Mrs. Emma Peel ".squeeze(" ").strip => "Mrs. Emma Peel" David -- David A. Black dblack@wobblini.net