Sha256: 1ed49efa880fda54e0d24086fffe2b87d843f37c8d383d2ca2f82ca68b0eed42
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
# Unicode::Name [![[version]](https://badge.fury.io/rb/unicode-name.svg)](http://badge.fury.io/rb/unicode-name) [![[travis]](https://travis-ci.org/janlelis/unicode-name.png)](https://travis-ci.org/janlelis/unicode-name) Return Unicode codepoint names, aliases, and labels. Unicode version: **8.0.0** Supported Rubies: **2.3**, **2.2**, **2.1** ## Usage ```ruby require "unicode/name" # Name Unicode::Name.of "A" # => "LATIN CAPITAL LETTER A" Unicode::Name.of "🚡" # => "AERIAL TRAMWAY" Unicode::Name.of "丁" # => "CJK UNIFIED IDEOGRAPH-4E01" # Aliases, by type Unicode::Name.aliases "\t" # => {:control=>["CHARACTER TABULATION", "HORIZONTAL TABULATION"], :abbreviation=>["HT", "TAB"]} # Corrections (via .aliases[:correction], then name) Unicode::Name.correct "A" # => "LATIN CAPITAL LETTER A" Unicode::Name.correct "Ƣ" # => "LATIN CAPITAL LETTER GHA" # Codepoint labels Unicode::Name.label("\0") # => "<control-0000>" Unicode::Name.label("\u{D800}") # => "<surrogate-D800>" Unicode::Name.label("\u{FFFFF}") # => "<noncharacter-FFFFF>" Unicode::Name.label("\u{10C50}") # => "<reserved-10C50>" # Best readable representation Unicode::Name.readable("A") # => "LATIN CAPITAL LETTER A" Unicode::Name.readable("\0") # => "NULL" Unicode::Name.readable("\u{FFFFD}") # => "<private-use-FFFFD>" ``` See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries. ## Todo * Hangul syllable names ## MIT License - Copyright (C) 2016 Jan Lelis <http://janlelis.com>. Released under the MIT license. - Unicode data: http://www.unicode.org/copyright.html#Exhibit1
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unicode-name-1.2.0 | README.md |