Top "Gstring" questions

Groovy String class

String concatenation with Groovy

What is the best (idiomatic) way to concatenate Strings in Groovy? Option 1: calculateAccountNumber(bank, branch, checkDigit, account) { bank + branch + checkDigit + …

string groovy idioms string-concatenation gstring
Groovy different results on using equals() and == on a GStringImpl

According to the groovy docs, the == is just a 'clever' equals() as it also takes care of avoiding NullPointerException. So, …

groovy equals gstring
Create String list in Groovy

The following code in Groovy adds GStrings to the list: List<String> args = [ 'cmd', "-Dopt=${value}" ] When I …

list groovy gstring type-coercion
How to access Jenkinsfile parameters values as strings in a loop

In our Jenkinsfile we have a lot of parameters (parameterized build) and in this case I want to check if …

groovy jenkins-pipeline gstring
Get variable value for its name in Groovy

I have the following variables defined: def VAL1 = 'foo' def VAL2 = 'bar' def s2 = 'hello ${VAL1}, please have a ${VAL2}…

groovy gstring