2023-04-05 12:54 AM
Hello,
i have a maybe simple question but i did not get it.
If i have an array of some unsinged chars, let`s say:
value[0] = 0xAA
value[1] = 0xAB
value[2] = 0x0B
and i want to print them together as "AAAB0B" in a textarea, what is the best way?
The problem is that i am losing the 0 from "0B" value.
Unicode::snprintf(txt1Buffer, TXT1_SIZE, "%X%X%X", 0xAB, 0xCD, 0x0F);
That gives me an output of:
ABCDF
But i want the leading zero. ABCD0F
How can that be done?
Thank you very much.
Solved! Go to Solution.
2023-04-05 05:09 AM
Try %2X or %02X
2023-04-05 05:09 AM
Try %2X or %02X
2023-04-05 05:26 AM
Thank you so much.
%02X did it.