I’m curious to know if there is an easy way (ie. using clib, stl or stdlib functions) to convert a formatted (encoded?) byte string into an array of bytes (unsigned chars):
Example, formatted byte string:
\x8C\xB5{\x00\x00
to:
{ 0x8C, 0xB5, 0x7B, 0x00, 0x00 }
What you’re asking is decoding an encoded string into a plain array of chars.
To answer you question, no (AFAIK).
But can implemented quite easily.
Take a look at this.
http://www.dzone.com/snippets/decode-encoded-query-string-c
Does exactly what you aksed in 26 lines of code. Only difference a % istead of \x