From: Hee-Sob Park Date: 2001-07-23T14:25:12+09:00 Subject: [ruby-talk:18329] Re: capitalizing a string "jared l. jennings" wrote in message news:fHN67.9714$4v6.851679@e420r-atl3.usenetserver.com... > Say I've got a string p = 'fooBarPoit'. > then p.capitalize == 'Foobarpoit'. > > One way that works is (assuming that string was called p) > p[0..0].upcase + p[1..p.length] > How about p.sub(/^./){$&.upcase} Park Hee-Sob.