I have a byte array that contains a string like 1c1ba2... etc
I would like to print out 5 digits. so for example:
1c = 28
1b = 27
a2 = 162
my output needs to be five digits long so 28271.
I thought about using printf but it seems like when i use it it reports the count
its shows 1 more than there should be
so 1b = 27 but printf report 3. does printf do some kind of padding?
the reason i was looking at counts was to limit my output to 5. I am not sure how else i can do this.
the goal is to print 5 digits out of that byte array.
thank you for your help.
I would like to print out 5 digits. so for example:
1c = 28
1b = 27
a2 = 162
my output needs to be five digits long so 28271.
I thought about using printf but it seems like when i use it it reports the count
its shows 1 more than there should be
so 1b = 27 but printf report 3. does printf do some kind of padding?
the reason i was looking at counts was to limit my output to 5. I am not sure how else i can do this.
the goal is to print 5 digits out of that byte array.
thank you for your help.
Comment