MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: padding in ToString


Hi,

With[{i = 1},
  "data-" <> ToString[PaddedForm[i, 3, NumberPadding -> {"0", "0"}]] 
  ]

Regards
  Jens

Konstantin L Kouptsov wrote:
> 
> I generate a filename automatically by using
> 
> "data-"<>ToString[i]
> 
> however I would like it to be zero padded from the left (so all the
> numbers/names have the same length:
> 
> data-0000
> data-0001
> 
> How can I do that?
> 
> Konstantin.


  • Prev by Date: Re: Slope fields
  • Next by Date: RE: padding in ToString
  • Previous by thread: Re: padding in ToString
  • Next by thread: RE: padding in ToString