I try to convert a number between 0 and 255 to hexadecimal format. If I use sprintf("%X", 1) I get 1, but I need the output always to have width 2 (with leading 0s) instead of one. How can this be done?
I try to convert a number between 0 and 255 to hexadecimal format. If
Share
Use
%02X: