Created
August 9, 2013 19:18
-
-
Save brodock/6196371 to your computer and use it in GitHub Desktop.
Correção de escrita de nomes com acentuação em português (capitalize)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'unicode_utils' | |
UnicodeUtils.titlecase(word).gsub(/(( )(da|de|di|do|du|das|dos|e|a|o))/i) {|s| s.downcase} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment