I am working right now for a project using velocity.
We have a ticketnumber to create with a pattern. The ticket number has 8 or more chars and I need to insert leading zeros up to 11 chars.
$ticketNumber = 15464587
I would like to convert this number to 00015464587 up to 11 chars dynamically.
Imagine the number is 199999990 so I have 9 chars instead of 8. I would need to insert two leading zeros this time instead of three.
How can I do this?
I tried with .size()
function but I don't get a result.