Created
February 24, 2011 11:11
-
-
Save cris/842052 to your computer and use it in GitHub Desktop.
Use of codepoint feature in Ruby 1.9.2
This file contains hidden or 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
| ("а".ord.."я".ord).map {|cp| cp.chr('UTF-8')} | |
| # => ["а", "б", "в", "г", "д", "е", "ж", "з", "и", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment