lib/unicode/sequence_name.rb in unicode-sequence_name-1.14.1 vs lib/unicode/sequence_name.rb in unicode-sequence_name-1.15.0

- old
+ new

@@ -3,16 +3,26 @@ module Unicode module SequenceName def self.sequence_name(string) codepoints = get_codepoint_values(string) require_relative "sequence_name/index" unless defined? ::Unicode::SequenceName::INDEX - if res = INDEX[:SEQUENCES][codepoints] + if res = INDEX[:SEQUENCES][codepoints] || INDEX[:SEQUENCES_NOT_QUALIFIED][codepoints] res else nil end end class << self; alias of sequence_name; end + + def self.fully_qualified(string) + codepoints = get_codepoint_values(string) + require_relative "sequence_name/index" unless defined? ::Unicode::SequenceName::INDEX + if res = INDEX[:SEQUENCES][codepoints] + res + else + nil + end + end def self.get_codepoint_values(string) if string.valid_encoding? return string.codepoints elsif string.encoding.name == "UTF-8"