+2
Completed
new function: pad
"pad" -- should have two parameters, 1st indicates character to pad with (space, zero, letter, comma or so on) and 2nd indicates total length that should be padded to. The value should never be clipped to less than the length of the original input. Here's some examples:
input | command | output |
---|---|---|
0 | {input:pad:0:5} | 00000 |
2 | {input:pad:0:3} | 002 |
2 | {input:pad:0:2} | 02 |
202 | {input:pad:0:3} | 202 |
202 | {input:pad:0:2} | 202 |
202 | {input:pad:0:5} | 00202 |
BEEF | {input:pad:F:8} | FFFFBEEF |
This function will eliminate 2 variables for each time I have to massage version numbers.
Answer
If this gets implemented, there should be two functions though, one for padding to the left and one for padding to the right.
Answer
Completed
Functions will be padleft and padright. First argument is the length, second argument is the optional character (if not specified, space).
Customer support service by UserEcho
Functions will be padleft and padright. First argument is the length, second argument is the optional character (if not specified, space).