Hey,

I'm looking for a way to convert big amounts of hex and format them into Chr$("&H00") for example.

I have no idea how to achieve this... I'm guessing that I would need to loop through the entire text, extracting the first two characters, adding the Chr$("&H"" & extractedbit & """)"". I also need it to ignore spaces. I hope this makes sense.

For example say I have this: 3a ec 20 00

I want it to change to this: Chr$("&H3a") & Chr$("&Hec") & Chr$("&H20") & Chr$("&H00").

I'm also using Gambas.

Thanks for any help, sorry if that sounds confusing.