Posted By

sunfjun on 08/28/08


Tagged

ruby


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


ruby spring proper case


 / Published in: Ruby
 

  1. str = "how are you? are you feeling good?"
  2. puts str.split(/\s+/).each{ |word| word.capitalize! }.join(' ')
  3.  
  4.  

Report this snippet  

You need to login to post a comment.