Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/core_ext/to_hex_str.rb
Instance Method Summary (collapse)
-
- (Object) to_hex_str
Transforms each charactor in the String to hexadecimal.
Instance Method Details
- (Object) to_hex_str
Transforms each charactor in the String to hexadecimal.
18 19 20 |
# File 'lib/core_ext/to_hex_str.rb', line 18 def to_hex_str unpack('U' * length).collect { |x| "%02x" % x }.join end |