module TwitterCldr::Utils::CodePoints

Public Class Methods

from_char(char) click to toggle source
# File lib/twitter_cldr/utils/code_points.rb, line 16
def from_char(char)
  char.unpack('U*').first
end
from_chars(chars) click to toggle source
# File lib/twitter_cldr/utils/code_points.rb, line 20
def from_chars(chars)
  chars.map { |char| from_char(char) }
end
from_string(str) click to toggle source
# File lib/twitter_cldr/utils/code_points.rb, line 28
def from_string(str)
  str.unpack("U*")
end
to_char(code_point) click to toggle source
# File lib/twitter_cldr/utils/code_points.rb, line 12
def to_char(code_point)
  [code_point].pack('U*')
end
to_chars(code_points) click to toggle source
# File lib/twitter_cldr/utils/code_points.rb, line 24
def to_chars(code_points)
  code_points.map { |code_point| to_char(code_point) }
end
to_string(code_points) click to toggle source
# File lib/twitter_cldr/utils/code_points.rb, line 32
def to_string(code_points)
  code_points.map { |code_point| to_char(code_point) }.join
end