Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

convert to raw hex string

 [1/3] from: gschwarz:netconnect:au at: 12-Oct-2006 16:29


I had to convert a hex data to a string. I thought it would be a one word convert. a: 1160628767 b: to-string a == "1160628767"
>> c: to-binary b
== #{31313630363238373637}
>> print to-string c
1160628767 I wanted the 31313630363238373637 part as a string. :-( After some thinking..... I got the answer. c: to-string mold c remove/part c 2 clear back tail c print c 31313630363238373637
>> type? c
== string! Regards, Greg

 [2/3] from: greggirwin::mindspring::com at: 12-Oct-2006 5:32


Hi Greg, GS> I had to convert a hex data to a string. I thought it would be a one word GS> convert. GS> I wanted the 31313630363238373637 part as a string. :-( How about:
>> enbase/base form 1160628767 16
== "31313630363238373637" -- Gregg

 [3/3] from: gschwarz::netconnect::com::au at: 13-Oct-2006 8:01


Thank you, I knew there was a better way, just could not find it. Greg