/ Published in: Ruby
Expand |
Embed | Plain Text
str = "how are you? are you feeling good?" puts str.split(/\s+/).each{ |word| word.capitalize! }.join(' ')
You need to login to post a comment.
sunfjun on 08/28/08
1 person have marked this snippet as a favorite
str = "how are you? are you feeling good?" puts str.split(/\s+/).each{ |word| word.capitalize! }.join(' ')
You need to login to post a comment.