Hi, REBOL can do it all, although with some type conversions.

Encoding, step by step:

>> string: "this is a string"
== "this is a string"
>> binary: to-binary string
== #{74686973206973206120737472696E67}
>> binary-as-string: form binary
== "#{74686973206973206120737472696E67}"
>> hex-string: copy next next head remove back tail binary-as-string
== "74686973206973206120737472696E67"

Decoding, step by step:

>> binary-as-string-again: join "#{" [ hex-string "}" ]
== "#{74686973206973206120737472696E67}"
>> binary-again: do binary-as-string-again
== #{74686973206973206120737472696E67}
>> string-again: to-string binary-again
== "this is a string"

-- 
Michal Kracik

[EMAIL PROTECTED] wrote:
> 
> Hello all:
> I'm trying to set up a system for encoding
> a string into a target string that represents
> the hex values of the original string.
> I've got the encoding set up. Now I want
> to decode the string:
> So here's where I run into a dead-end.
> 
> I have a 2-byte string: value is "74"
> 
> I want to convert this value to a 't'
> 
> hint : 't' is ascii 116
> 
> 116 is hex 74;
> 
> de-hex doesn't do it. I'm trying to write
> a variation of de-hex.
> 
> Thanks for the help as always!!
> Tim

Reply via email to