On 3/1/08, Trans <transfire / gmail.com> wrote:
> I've always wondered why String#capitalize downcases the whole string
>  before it upcases the first letter. It's easy to subsequently downcase
>  the string if that's what is wanted, but it's more cumbersome to
>  capitalize the first letter on it's own. Ie.
>
>  Currently,
>
>   "the ATeam".capitalize  #=> "The ateam"
>   "the ATeam".sub(/\A(.)/){ $1.upcase }  #=> "The ATeam"
>
>  if otherwise,
>
>   "the ATeam".capitalize.downcase  #=> "The ateam"

Didn't you mean:

     "the ATeam".downcase.capitalize #=> "The ateam"



-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/