Re: how can i format a number as binary or hexadecimal?

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Friday, July 22, 2011, 2:15:44 AM, afryer wrote:

> Hi, I'm a freemarker noob and want to know how I can display a number in
> binary format or hexadecimal?  I see there is a string built in for a number
> but i don't think I can use that to format a number in binary format.  I
> want to do something like ${number?bin} or ${number?hex}. 

Unfortunately there's nothing built in for that. So for now you will
have to write your own #function or TemplateMethodModelEx to do this.

> --
> View this message in context:
> http://freemarker.624813.n4.nabble.com/how-can-i-format-a-number-as-binary-or-hexadecimal-tp3685593p3685593.html
> Sent from the freemarker-user mailing list archive at Nabble.com.
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.