Re: Converting Large String To HEX More Quick Any Help Please
Converted my byte array versions to string versions in 10 minutes or so. Writing this post took me longer than making the changes...
HexStringToString
Input: any string containing any hex pairs – any single character or invalid character pair is simply ignored
Output: string where all the hex pairs are translated to their byte equivalent
This means you can call HexStringToString("41 00garb.age!4200WOOHOO...43.......00") and the output is "ABC", because the only valid hex pairs are: 41, 00, 42, 00, 43, 00
Format: a string containing a zero pair to represent hex characters and other characters to represent a single row of data
(default value: "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00")
Separator: a string separator between each Format row
(default value: vbNewLine)
Lowercase: True = hex pair characters are lower case (abcdef), False = upper case (ABCDEF)
(default value: True)
Okay, this one here is a very powerful function. You can give it almost anything and you get it formatted the way you want. If all you want is to have a space separator between each hex pair, you can call it like this:
FINALLY: the code is fast compiled. Running in the IDE it doesn't do that well, there the code is interpreted from P-code on-the-fly and that isn't very efficient.