How can I convert "1234567890" to "x12x34x56x78x90" in Ruby?
"1234567890"
"x12x34x56x78x90"
Try this:
["1234567890"].pack('H*')
2.1m questions
2.1m answers
60 comments
57.0k users