In freemarker, I have a macro
that does the following:
<#macro myfunc x>
So, essentially, if
(which starts off as a string) and is convertible to a number, then I want to wrap it in
otherwise just display the value.
I am fine with this solution except for the ugly
error logging which comes with it.
There does not seem to be a simple way to check if a string is convertible to a number without using
or my research is faltering -- I would also rather not do this on the Java side because I see this as view code and doesn't belong with my model code. Anyone know?