in reply to sprintf to zero-pad on the right
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: sprintf question
by Anonymous Monk on Mar 15, 2004 at 16:33 UTC |