Skip to content

Instantly share code, notes, and snippets.

@brodock
Created August 9, 2013 19:18
Show Gist options
  • Save brodock/6196371 to your computer and use it in GitHub Desktop.
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)
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