You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "g.nunesrodrigues@cs.ucl.ac.uk" <g....@cs.ucl.ac.uk> on 2004/03/05 00:10:20 UTC
converting string to integer
Hello,
I've just started my first steps on Velocity and I've been looking for the
answer for a very elementary question: how to convert a string into an
integer type using Velocity directives. Sorry for the wide circulation for
this, but I haven't found it in the User Guide.
Many thanks,
Genaína.
_______________________________________________
Genaína Nunes Rodrigues
PhD Student in Computer Science - UCL, UK
http://www.cs.ucl.ac.uk/staff/g.nunesrodrigues/
_______________________________________________
"Life itself and all that goes with it -
all the glory of it, all the power of it -
every many splendid thing
is a free gift from the God who made us." - Trevor Huddleston
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: converting string to integer
Posted by Mike Kienenberger <mk...@alaska.net>.
Geir Magnusson Jr <ge...@4quarters.com> wrote:
>
> On Mar 4, 2004, at 6:10 PM, g.nunesrodrigues@cs.ucl.ac.uk wrote:
>
> > Hello,
> >
> > I've just started my first steps on Velocity and I've been looking for
> > the
> > answer for a very elementary question: how to convert a string into an
> > integer type using Velocity directives. Sorry for the wide circulation
> > for
> > this, but I haven't found it in the User Guide.
>
> There is no built in way, but using a tool in your context you can do
> things like this.
>
> See the velocity-tools project for code that does this.
Yeah, the NumberFormat tool's toNumber() method will do this for you.
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: converting string to integer
Posted by Geir Magnusson Jr <ge...@4quarters.com>.
On Mar 4, 2004, at 6:10 PM, g.nunesrodrigues@cs.ucl.ac.uk wrote:
> Hello,
>
> I've just started my first steps on Velocity and I've been looking for
> the
> answer for a very elementary question: how to convert a string into an
> integer type using Velocity directives. Sorry for the wide circulation
> for
> this, but I haven't found it in the User Guide.
There is no built in way, but using a tool in your context you can do
things like this.
See the velocity-tools project for code that does this.
geir
>
> Many thanks,
> Genaína.
> _______________________________________________
>
> Genaína Nunes Rodrigues
> PhD Student in Computer Science - UCL, UK
> http://www.cs.ucl.ac.uk/staff/g.nunesrodrigues/
> _______________________________________________
>
> "Life itself and all that goes with it -
> all the glory of it, all the power of it -
> every many splendid thing
> is a free gift from the God who made us." - Trevor Huddleston
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
--
Geir Magnusson Jr 203-247-1713(m)
geir@4quarters.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org