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

Converting Hex value to String

 [1/5] from: mark::jobstreet::com at: 24-Apr-2002 18:52


I have a HEX value a: #{096A6F6273747265657403636F6D} if I use to-string a result is "^-jobstreet^Ccom". That is NOT what I want. what I want is to convert to b: "096A6F6273747265657403636F6D" Sound easy but could not find a simple way to do it. Any idea? Thanks. Mark Chang - [mark--jobstreet--com] Founder of JobStreet.com, www.jobstreet.com 250 Tanjong Pagar Road #11-01 St Andrew's Centre Singapore 088541 Fax: 65-538 0090 Tel: 65-538 0060 #1 Ground Floor Office, Equatorial Penang, 1 Jalan bukit Jambul, 11900 Penang Malaysia. Fax: 604 643 6461 Tel: 604 644 5912

 [2/5] from: rebol:optushome:au at: 24-Apr-2002 22:29


Hi Mark, Here's one way to skin the cat, I'm sure more will turn up. b: trim/with form a "#{}" =="096A6F6273747265657403636F6D" Cheers, Allen K

 [3/5] from: brett:codeconscious at: 24-Apr-2002 21:55


To change your Binary! value to a string you can use enbase:
>> enbase/base a 16
== "096A6F6273747265657403636F6D" Brett.

 [4/5] from: dockimbel:free at: 24-Apr-2002 15:05


Mark Chang wrote:
> I have a HEX value > a: #{096A6F6273747265657403636F6D}
<<quoted lines omitted: 4>>
> b: "096A6F6273747265657403636F6D" > Sound easy but could not find a simple way to do it. Any idea? Thanks.
A solution can be :
>> a: #{096A6F6273747265657403636F6D}
== #{096A6F6273747265657403636F6D}
>> head remove back tail remove/part mold a 2
== "096A6F6273747265657403636F6D" HTH, -DocKimbel.

 [5/5] from: joel:neely:fedex at: 24-Apr-2002 9:34


Hi, Mark,
>> a: #{096A6F6273747265657403636F6D}
== #{096A6F6273747265657403636F6D}
>> copy at head remove back tail mold a 3
== "096A6F6273747265657403636F6D" Simple? You be the judge! ;-) -jn- Mark Chang wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted