You could use the jakarta commons library. The actual file is:
org.apache.commons.lang.StringUtils. It has various padding methods.
Just pass the StringUtils into velocity context.

Cheers,

Jian


On Fri, 11 Mar 2005 11:21:07 -0800 (PST), Gagan 007
<[EMAIL PROTECTED]> wrote:
> 
> I have to show some file in this format
> 
> S#  Value
> 
> 0001 abc
> 0002 adc
> 0003 afc
> 0004 sbc
> 0005 fbc
> 0006 abh
> 0007 afc
> 0008 sbc
> 0009 fbc
> 0010 hbc
> 0011 alc
> 0012 a;c
> 0013 a'b
> 0014 ab[
> 0015 ayc
> 0016 a5c
> 0017 ab4
> 0018 a3c
> and so on
> 
> 0100 abc
> 
> I have all the values  in the collection and i m iterating through it...
> Plus i need to show the S#... which gets incremented with each value...as 
> shown above...
> 
> The size of the sequence no.. is 4 digits.. if there are not 4 digits then 
> the s# is left padded with 0
> u can c the example above...
> 
> Is there any feature in Velocity to generate this S# while i m iterating 
> through the values...
> 
> Its urgent any help would be appreciated..
> 
> 
> ---------------------------------
> Do you Yahoo!?
>  Yahoo! Mail - You care about security. So do we.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to