Re: padding in ToString
- To: mathgroup at smc.vnet.net
- Subject: [mg43740] Re: padding in ToString
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 2 Oct 2003 02:52:18 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <blcqom$p8b$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
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.