Question: I want to read a String from database and replace the placeholder by converting it to a GString. Can I do this with Eval? Any other ideas?

```
String stringFromDatabase = 'Hello ${name}!'
String name = 'world'

assert 'Hello world!'== TODO

```

Answer: 
I solved this with [Eval](http://docs.groovy-lang.org/latest/html/api/groovy/util/Eval.html):

```
String stringFromDatabase = 'Hello ${name}!'
String name = 'world'

assert 'Hello world!' == Eval.me('name', name, '"' + stringFromDatabase + '"')

```
You should be using double quoted String literal if you want to use place holders.

The following should work:

```
String name = 'world'
String stringFromDatabase = "Hello ${name}!" //use double quotes

assert 'Hello world!' == stringFromDatabase

```

See the [official Groovy documentation about Strings](http://docs.groovy-lang.org/latest/html/documentation/index.html#all-strings) to see other ways you can make this work.