Description Usage Arguments Value Note Author(s) Examples
Digit takes a number and places leading zeros before it if needed to bring the length of the number up to places. Inputs can be either numeric or character but must be integers (e.g., "1" or 1 are okay, 1.5 is not).
1 | Digit(number, places)
|
number |
The input number (potentially) in need of leading zeros |
places |
The number of places the final number should have. Needs to be greater than or equal to one. |
A number with leading zeros in character format
I have written a similar function for Python, but with a different implementation.
Alexander "Sasha" Keyel
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.