ruby spring proper case


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. str = "how are you? are you feeling good?"
  2. puts str.split(/\s+/).each{ |word| word.capitalize! }.join(' ')
  3.  
  4.  

Report this snippet


Comments


You need to login to view comments.