Created
December 29, 2013 18:43
-
-
Save yannvery/8173411 to your computer and use it in GitHub Desktop.
How to downcase accented chars with ruby
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
# Downcase accented chars | |
"Île de France".mb_chars.downcase.to_s | |
# => "île de france" | |
# Downcase and remove accented chars | |
I18n.transliterate("Île de france").downcase | |
# => "ile de france" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment