From: dblack@... Date: 2006-04-08T23:15:06+09:00 Subject: Re: Ruby string Hi -- On Sat, 8 Apr 2006, Alex Barrett wrote: > unknown wrote: >> I can't think of a better way to do this than what's already been >> posted, though it really does feel like there should be. > > Actually, there is :S > You can save three whole keypresses (or just two if you dislike > whitespace) by doing: >> string[0, 1] = string[0, 1].capitalize Isn't that the same as what you'd already posted? David -- David A. Black (dblack@wobblini.net) Ruby Power and Light, LLC (http://www.rubypowerandlight.com) "Ruby for Rails" coming in PDF April 15, and in paper May 1! http://www.manning.com/black