Re: someVar to SOME_VAR
Alex7 <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Sure, i wrap it, but razer to macro then function:
<#macro ConvertToConstantName variable><#compress>
${variable?replace('(\\p{Upper})', '_$1', 'r')?upper_case}
</#compress></#macro>
Actually i don't know other difference between macro and function beside
that function must have return statement.
Neither macro no function could be used inside tag AFAIK.
--
View this message in context: http://www.nabble.com/someVar-to-SOME_VAR-tp21963366p22017204.html
Sent from the freemarker-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H