Función básica para eliminiar acentos en minúsculas


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def quita_acentos( texto)
  2. texto= texto.gsub('á', 'a')
  3. texto= texto.gsub('é', 'e')
  4. texto= texto.gsub('í', 'i')
  5. texto= texto.gsub('ó', 'o')
  6. texto= texto.gsub('ú', 'u')
  7. end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.