#set( $Integer = 0 ) #set( $total = $Integer.parseInt($string1) + $Integer.parseInt($string2) )
or put an instance of MathTool (from VelocityTools) in your context and do: #set( $total = $math.add($string1, $string2) ) On Mon, Jan 19, 2009 at 4:39 AM, Jesus Barbero <[email protected]> wrote: > I need a function to parse a String to int. > > > > I have two String values which I have to add. > > > > Could you send me some information about how to solve it?? > > > > I was thinking in browse the list but I don´t know how to browse the String > element by element (char by char). > > > > Kind Regards > > > > Jesús Barbero Águeda > Software Engineer. > > Tel +34 91 640 96 10 Ext. 5361 > > Opodo Ltd. > C/ Copenhague 12, EDIFICIO TIFAN > Las Rozas, Madrid > www.opodo.com <http://www.opodo.com/> > > Opodo - let the journey begin > Flights, Hotels, Cars, Holidays and Insurance > www.opodo.de <http://www.opodo.de/> , www.opodo.at <http://www.opodo.at/> , > www.opodo.co.uk <http://www.opodo.co.uk/> , www.opodo.fr > <http://www.opodo.fr/> , www.opodo.it <http://www.opodo.it/> , www.opodo.es > <http://www.opodo.es/> , www.vivacances.fr <http://www.vivacances.fr/> , > www.travellink.dk <http://www.travellink.dk/> , www.travellink.se > <http://www.travellink.se/> , www.travellink.no <http://www.travellink.no/> > and www.travellink.fi <http://www.travellink.fi/> > > > > Disclaimer > ------------------------------------------------------------------------------------------- > This email message has been scanned for viruses by Mimecast. > Mimecast delivers a complete managed email solution from a single web based > platform. > For more information please visit www.mimecast.com > ------------------------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
