From: Jack Dempsey Date: 2002-01-26T02:50:21+09:00 Subject: RE: upcase/downcase first character of a word to upcase i'd use capitalize...not sure about downcasing JUST the first letter... > -----Original Message----- > From: Tobias Reif [mailto:tobiasreif@pinkjuice.com] > Sent: Friday, January 25, 2002 12:48 PM > To: ruby-talk ML > Subject: upcase/downcase first character of a word > > > any simpler way than > -- > class String > > def upcase_first > self[0] = self[0].chr.upcase[0] > self > end > > def downcase_first > self[0] = self[0].chr.downcase[0] > self > end > > > end > -- > ? > > Tobi > -- > http://www.pinkjuice.com/ > >