Skip to content

Instantly share code, notes, and snippets.

@halan
Forked from brennovich/replaceSpecialChars.js
Last active December 19, 2015 00:39
Show Gist options
  • Save halan/5869860 to your computer and use it in GitHub Desktop.
Save halan/5869860 to your computer and use it in GitHub Desktop.
class String
ACCENTED_VOWELS = "áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇ"
UNACCENTED_VOWELS = "aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC"
def unaccentize
self.tr ACCENTED_VOWELS, UNACCENTED_VOWELS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment