Skip to content

Instantly share code, notes, and snippets.

@jonatasemidio
Created July 8, 2015 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonatasemidio/a0109ce9b4d92d5bfdc6 to your computer and use it in GitHub Desktop.
Save jonatasemidio/a0109ce9b4d92d5bfdc6 to your computer and use it in GitHub Desktop.
Conversor de Português para Plutãones
// Definição do problema: https://gist.github.com/jonatasemidio/8b95d2c666004065c53f
String.metaClass.getFirstIsVowel{-> return delegate[0] ==~ /[aeiou]/}
'plutãones'.replace(' ','&').collect{ if(it.firstIsVowel){return it+"#"}else{return it}}.join().split('#').collect{it+'pl'+it[-1]}.join().replace('&', ' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment