velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <>
Subject Re: String Numerical Testing?
Date Mon, 08 Nov 2004 20:50:55 GMT
Hi Clifton,

> Hello all. I'm still green with Velocity. I'm wondering what's the
> easiest way to test a string for a numeric. For example, I have a string
> $myVal that can contain "foo", or "23.2", or "15". I want to 1st check
> if it is a numeric and then wrap it with quotes if it is not.
I would use o.a.c.l.math.NumberUtils as a tool.

If it doesn't do what you want, you can always create your own tool.  ;)

Best regards,
-- Shinobu Kawai

Shinobu Kawai <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message