Unicode::Age [version] [ci]

A micromodule to detect which Unicode version is required to display a string.

Unicode::Age.of "A" # => 1.1
Unicode::Age.of "ℜսᖯʏ" # => 3.0
Unicode::Age.of "ℜ𝘂ᖯʏ" # => 3.1
Unicode::Age.of "🚡" # => 6.0
Unicode::Age.of "🛲" # => 7.0
Unicode::Age.of "🌮 " # => 8.0
Unicode::Age.of "🛒" # => 9.0
Unicode::Age.of "🛷"  # => 10.0
Unicode::Age.of "\u{10FFFF}" # => nil
Unicode::Age.of "\u{10FFFD}" # => 2.0

Characters of status "Unassigned" (Unicode General Category of Cn) will raise a Unicode::Age::UnknownAge exception.

Supported Ruby/Unicode versions

See the Unicode — Ruby version table at Idiosyncratic Ruby

MIT License

Copyright (C) 2016-2020 Jan Lelis https://janlelis.com. Released under the MIT license.