Categories
How to convert a string to hexadecimal system?
I don't get out. Outputs 0 in output
Answer the question
In order to leave comments, you need to log in
"string".each_byte.map { |b| b.to_s(16) }.join # или так "string".unpack('H*').first
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question