March 27th, 2003, 08:36 AM
For example, if the number is 15, and i want it to be 5 digits long, the function should output the string "00015".
Thanks in advance.
March 27th, 2003, 08:45 AM
just get the length of the string (varname.length) and then subtract that from the length you want it to be. Then use a for loop to add 0's to the variable/string until you reach the difference.
March 27th, 2003, 02:06 PM