I\'m trying to convert an all-uppercase string in Ruby into a lower case one, but with each word\'s first character being upper case. Example:
convert \"MY STRING HE
From ActiveSupport
"MY STRING HERE".gsub(/\b('?[a-z])/) { $1.capitalize }
If you are using Rails/ActiveSupport, the method is already available for free.