Hi,

I am a rank fresher to velocity, I have been asked to do a few things on
it. I am basically using it to generate string commands based on data
received and send it down to a device.

My problem now is to find if a value passed to me is a charecter string
or a numeric value. This piece of code i wrote for it does not
work.....any pointers on doing it will be highly helpful. Below is code
i wrote which does not work

 
    #set($letterCount=0)
    #set($lng=$stdCommListNo.length() - 1)
    #foreach( $i in [0..$lng] )
        #set($char=$stdCommListNo.charAt($i))
        #if(!$Character.isDigit($char))
            #set($letterCount=$letterCount + 1)
        #end
    #end
    #if($letterCount > 0)
        <Do some printing for string value>
     #else
           <Do some printing for numeric value>
     #end
 
 
Any help in this direction will be highly helpful......please dont mind
if it is too dumb a question....it will motivate me to dig
more......thanks.

Warm Regards,
Muthu Kumaran.L

"Faith is to believe what you do not yet see; the reward for this faith
is to see what you believe."
-Swami Vivekananda

  • How to find whet... Muthu Kumaran Lekshmanan -X \(mlekshma - WIPRO at Cisco\)

Reply via email to