Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rahyab/string.rb
Instance Method Summary collapse
-
#to_h ⇒ Object
Return String in HEX.
Instance Method Details
#to_h ⇒ Object
Return String in HEX
5 6 7 8 9 |
# File 'lib/rahyab/string.rb', line 5 def to_h codepoints = self.codepoints codepoints = codepoints.map { |n| format('%04x', n) } return codepoints.join end |