Created
December 18, 2014 16:22
-
-
Save marti1125/ebab992a64802de51764 to your computer and use it in GitHub Desktop.
cambiarLetras
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
| function cambiarLetras(letra){ | |
| var resultado = letra.replace(/Á|_/g, "Á").replace(/á|_/g, "á") | |
| .replace(/É|_/g, "É").replace(/é|_/g, "é") | |
| .replace(/Í|_/g, "Í").replace(/í|_/g, "í") | |
| .replace(/Ó|_/g, "Ó").replace(/ó|_/g, "ó") | |
| .replace(/Ú|_/g, "Ú").replace(/ú|_/g, "ú") | |
| .replace(/ñ|_/g, "ñ").replace(/Ñ|_/g, "Ñ") | |
| .replace(/´|_/g, "´").replace(/ý|_/g, "ý") | |
| .replace(/Ý|_/g, "Ý"); | |
| return resultado; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment