Sha256: 6552b859730a2e6727877f1990a47fc87ff95d5774bd9737b2700c077d1cd6a5
Contents?: true
Size: 394 Bytes
Versions: 1
Compression:
Stored size: 394 Bytes
Contents
# encoding: UTF-8 module TwitterCldr module Normalizers class Base class << self def code_point_to_char(code_point) [code_point.upcase.hex].pack('U*') end def char_to_code_point(char) code_point = char.unpack('U*').first.to_s(16).upcase code_point.rjust(4, '0') #Pad to at least 4 digits end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
twitter_cldr-1.1.0 | lib/normalizers/base.rb |