sebi wrote:


> sorry for this very simple question, but how would i turn the first
> letter of a string into lowercase?
> 
> feel free to tell me to rtfm as long as you tell me as well where to
> find the fm ;-)



class String

   def upcase_first
     out = self.dup
     out[0,1] = out[0,1].upcase
     out
   end

   def downcase_first
     out = self.dup
     out[0,1] = out[0,1].downcase
     out
   end

end

Tobi

-- 

* peace&love.
* http://www.pinkjuice.com/