KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What's the best way in Ruby (with Rails, if relevant) to capitalize the first letter of a string? Note that String#capitalize is not what I want since, in addition to capitalizing the first letter of the string, this function makes all other characters lowercase (which I don't want -- I'd like to leave them untouched): >> "a A".capitalize => "A a"
Tags (comma-separated)
Save Edits
Cancel