Let's say I have an integer i, and want to display n characters total when I output the integer as a string (padding the string with leading zeros).
For example:
i = 10, n = 2 ==> 10
i = 10, n = 3 ==> 010
i = 5, n = 2 ==> 05
i = 5, n = 3 ==> 005
Let's say I have an integer i, and want to display n characters total when I output the integer as a string (padding the string with leading zeros).
For example:
i = 10, n = 2 ==> 10
i = 10, n = 3 ==> 010
i = 5, n = 2 ==> 05
i = 5, n = 3 ==> 005