[ https://issues.apache.org/jira/browse/GROOVY-8564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
paolo di tommaso updated GROOVY-8564: ------------------------------------- Description: Upcoming version of Java will include a new syntax for raw string literals using back tick character as string delimiter. For example: {noformat} String s = `Doesn't have a \n newline character in it`; String ss = `a multi- line-string`; String sss = ``a string with a single tick (`) character in it``; String ssss = `a string with two ticks (``) in it`; String sssss = `````a string literal with gratuitously many ticks in its delimiter`````;{noformat} You can read more at [this thread|http://mail.openjdk.java.net/pipermail/amber-spec-experts/2018-March/000446.html] and the [official proposal page|http://openjdk.java.net/jeps/326]. The main difference compared to the Groovy multi-line string literals is that raw string literals do not require to escape special characters, such as `\`, `\n`, etc. The string is assigned to the variable exactly how is typed. This makes it very useful for Groovy based DSL. was: Upcoming version of Java will include a new syntax for raw string literals using back tick character as string delimiter. For example: {noformat} String s = `Doesn't have a \n newline character in it`; String ss = `a multi- line-string`; String sss = ``a string with a single tick (`) character in it``; String ssss = `a string with two ticks (``) in it`; String sssss = `````a string literal with gratuitously many ticks in its delimiter`````;{noformat} You can read more in [this thread|http://mail.openjdk.java.net/pipermail/amber-spec-experts/2018-March/000446.html] and the [official proposal page|http://openjdk.java.net/jeps/326]. The main difference compared to the Groovy multi-line string literals is that raw string literals do not require to escape special characters, such as `\`, `\n`, etc. The string is assigned to the variable exactly how is typed. This makes it very useful for Groovy based DSL. > Added support for Java like raw string literals > ----------------------------------------------- > > Key: GROOVY-8564 > URL: https://issues.apache.org/jira/browse/GROOVY-8564 > Project: Groovy > Issue Type: Bug > Affects Versions: 3.0.0-alpha-3 > Reporter: paolo di tommaso > Priority: Major > > Upcoming version of Java will include a new syntax for raw string literals > using back tick character as string delimiter. For example: > > {noformat} > String s = `Doesn't have a \n newline character in it`; > String ss = `a multi- > line-string`; > String sss = ``a string with a single tick (`) character in it``; > String ssss = `a string with two ticks (``) in it`; > String sssss = `````a string literal with gratuitously many ticks > in its delimiter`````;{noformat} > > You can read more at [this > thread|http://mail.openjdk.java.net/pipermail/amber-spec-experts/2018-March/000446.html] > and the [official proposal page|http://openjdk.java.net/jeps/326]. > The main difference compared to the Groovy multi-line string literals is that > raw string literals do not require to escape special characters, such as `\`, > `\n`, etc. The string is assigned to the variable exactly how is typed. This > makes it very useful for Groovy based DSL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)