Re: How to convert a string into a Long?
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Tuesday, May 19, 2009, 5:10:16 AM, Airman84 wrote: > Hey Guys, > > Trying to convert a string into a long with freemarker. > > Searched around for some examples or hints, but couldn't find anything. > > Can anyone help me out? I would appreciate it greatly! To convert a string to number, use aString?number (FTL has only a single numerical type, no long, int, double, etc.). If you pass this number as argument to a Java method that expects a long, the conversion should happen automatically behind the scenes. But if it doesn't go as you wished (ambiguities, etc.), you can add a Java-type hint to the FTL number with ?long, i.e., you write aString?number?long. > Thanks! > > --Airman -- Best regards, Daniel Dekany ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects