class String

Public Instance Methods

to_h() click to toggle source

Return String in HEX

# File lib/rahyab/string.rb, line 5
def to_h
  codepoints = self.codepoints
  codepoints = codepoints.map {  |n| format('%04x', n) }
  return codepoints.join
end