Created
July 8, 2011 02:08
-
-
Save mauricio/1070959 to your computer and use it in GitHub Desktop.
Transliterate function for PT-BR
This file contains 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
public class Utils { | |
public static String transliterate( String content ) { | |
return content.replaceAll( "(ã|á|â)" , "a") | |
.replaceAll( "(é|ê)", "e" ) | |
.replaceAll( "(í)", "i" ) | |
.replaceAll( "(ó|ô|õ)", "o" ) | |
.replaceAll( "(ú)", "u" ); | |
} | |
} |
hahhaha, valeu :D
##
Maurício Linhares
http://techbot.me/ - http://twitter.com/#!/mauriciojr
…On Tue, Jul 19, 2011 at 11:34 PM, rponte ***@***.*** wrote:
I know it's too late but take a look at this,
https://gist.github.com/893494 (impl)
https://gist.github.com/893497 (test)
:-)
##
Reply to this email directly or view it on GitHub:
https://gist.github.com/1070959
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know it's too late but take a look at this,
https://gist.github.com/893494 (impl)
https://gist.github.com/893497 (test)
:-)