Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 4
    Be aware that some languages have different ideas about what the first letter to be capitalized is. In Irish, you do things like "i mBaile Átha Cliath" ("in Dublin") - lower-case 'm', upper-case 'B'. (See en.wikipedia.org/wiki/Consonant_mutation#Celtic_languages if you're curious about why Irish would do that and why it makes sense.) Commented Feb 9, 2012 at 23:19
  • 4
    And also be aware that #capitalize will downcase all letters which aren't the first letter...which is not always what you want. ['space', 'UFO', 'NASA'].collect{|w| w.capitalize} #=> ['Space', 'Ufo', 'Nasa'] Commented Nov 9, 2015 at 20:03