From: Cheyne Li Date: 2008-07-24T01:13:29+09:00 Subject: Re: how to capitalize a number of characters in a word Marc Heiler wrote: >> For example, how can i get "HelLoha" from "helloha" > > Probably one hundred million ways. One could be this: > > > x = "helloha" # => "helloha" > x.capitalize! # => "Helloha" > x[2,1] = x[2,1].capitalize # => "L" > > > x # => "HeLloha" > > > And yeah instead of 2,1 you would do 3,1. Thank you very much. It helps a lot -- Posted via http://www.ruby-forum.com/.