Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.5.1
-
None
-
None
Description
Several times it has been asked on the mailing list on how to either convert a String to a GString or to evaluate a String as a GString. The need arises when a String comes in from an external source and contains a GString expression, for example an XML file or a Configuration file. Currently one needs to either invoke the GroovyShell or the SimpleTemplateEngine to accomplish the task. In both cases this takes several lines of code and is not intuitively obvious.
One could ether add a GDK method to String such as "evaluate" (which in my humble opinion would be the nicest) or provide a conversion of the form "String as GString"