URL: http://hansamann.podspot.de/files/grails_podcast_episode_29.mp3
This snippet shows the different types of strings in Groovy and plays with them. Listen to the audio to get the best learning experience. Simply right-click on the title above to download the mp3 file of this part of the series.
The Groovy Series is part of the Grails Podcast and can be subscribed to via: http://hansamann.podspot.de/rss. The series is produced by Dierk König and Sven Haiges, further information about the topic of this episode can be found in the book
Groovy in Action - http://groovy.canoo.com/gina
//Single quote = normal Java String //GString //Multiple lines of normal String text Line Two Line Three''' //MultiLine GString ${replacement + 's'} have to be solved immediately!""" //slashy String form assert slashyString == 'Groovy can master any problem in no time. Look, no escaping of \\ backslashes'
Comments
Subscribe to comments
You need to login to post a comment.

The test on line 27 will fail because the value for lines[0] will be "Groovy can master any $replacement." with the extra DOT in the end of line.
by remove the DOT. The test pass. Hope this help.
Groovy rocks
Thanx for the correction - the dot is removed. The snippet should now work in groovyConsole without changes... Sven