class ActiveSupport::Multibyte::Chars
def titleize
"ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró"
Capitalizes the first letter of every word, when possible.
def titleize chars(downcase.to_s.gsub(/\b('?\S)/u) { $1.upcase }) end
def titleize chars(downcase.to_s.gsub(/\b('?\S)/u) { $1.upcase }) end