Z
Zangief Ief
Hello,
I would like to write a function which is able to convert a binary data
into its string format...
For example, here I have the opposite of my goal:
str.unpack('c*').collect { |x| sprintf('%02x', x) }.to_s.hex.to_s(2)
As you can see, this line can convert the string *str* to its binary
format.
Thanks for your help.
Zhang'
I would like to write a function which is able to convert a binary data
into its string format...
For example, here I have the opposite of my goal:
str.unpack('c*').collect { |x| sprintf('%02x', x) }.to_s.hex.to_s(2)
As you can see, this line can convert the string *str* to its binary
format.
Thanks for your help.
Zhang'