in reply to sprintf to zero-pad on the right

I really don't know if there's not a much better solution, but this does the trick:

reverse(sprintf("%08s", "" . reverse( "TEST")));

regards,
tomte


Hlade's Law:

If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.