groovyStrings and GString literals


Syntax

  • 'Single quoted string'
  • "Double quoted string"
  • '''Multiline string'''
  • """Triple double quoted string"""
  • /Slashy string/
  • $/Dollar slash string/$

Remarks

Groovy has two string types the java java.lang.String and groovy.lang.GString, as well as multiple forms of string literals (see syntax and examples).

The main difference between the two types of strings is that GString supports string interpolation.