Update: If you have a variable length string, then usemy $string = 'TEST'; $string .= '0000';
to pad it to the desired $fixed_length.$string .= '0' x ($fixed_length - length $string);
-Mark
In reply to Re: sprintf question
by kvale
in thread sprintf to zero-pad on the right
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |