Re: someVar to SOME_VAR
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Sunday, February 15, 2009, 9:54:36 AM, Daniel Dekany wrote:
> Saturday, February 14, 2009, 10:32:20 PM, Alex7 wrote:
>>
>> 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.
[snip]
> Function/method versus user-defined directive <--- READ THIS!
> ---------------------------------------------
[snip]
Oh, I forgot to add: macros (not to be confused with methods!) are
user-defined directives. So that's why the quoted things was an answer
to your question.
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
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