john6847

Untitled

Jun 30th, 2017
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. up vote
  2. 0
  3. down vote
  4. favorite
  5. So simple question, which I simply cannot solve: how to reverse a string using Freemarker?
  6.  
  7. I have tried following:
  8.  
  9. <#assign reversed = mystring?reverse() />
  10. But strings does not have reverse method... I've also tried:
  11.  
  12. <#assign reversed = mystring?split("")?reverse()?join("") />
  13. But apparently split("") is not valid freemarker syntax. Is there a way to do this?
Add Comment
Please, Sign In to add comment