Saturday, May 5, 2012

Capitalizing the words within a string

Code to capitalize the words within a string
string.split.map(&:capitalize).join ' '

No comments:

Post a Comment