You can also use plain VTL:
#set( $id = $number )
#set( $len = $id.length() - 4 )
$id.substring($len)
To simplify the use, you can create a macro for this:
#macro( fourdigits $number )#*
*##* #local( $id $len ) *##*-- optional directive, avoids polluting
context
*##set( $id =
Thanx chen , i will look check this
jian chen [EMAIL PROTECTED] wrote: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
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