Created
November 6, 2018 09:45
-
-
Save abstractart/15fe73166a67ebf1880c2e06f542a1ab to your computer and use it in GitHub Desktop.
Downcase non-ASCII characters in Ruby < 2.4
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
# gem install activesupport | |
require 'active_support/core_ext/string/multibyte' | |
"Женя".mb_chars.downcase.to_s # => "женя" | |
"Женя".mb_chars.upcase.to_s # => "ЖЕНЯ" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment