string = "this is a String"
string.capitalize = "This is a string"
That works but changes my capital "a String" to lowercase.

I only want to capitalize first letter.
So I try"
string[0..0].capitalize
irb => "T"
OK
string[0..0].capitalize!
irb => "T"
irb string
irb => "this is a string"

I am a noob but I don't get that.
Where is my capitalised first letter.

Anybody?

-- 
Posted via http://www.ruby-forum.com/.