Reputation: 557
I want to append a string to each string in a list of strings. I was wanting to do something like this
def a = 'a '
def b = 'b '
[a,b].each {
it += 'yo'
}
assertEquals a, 'a yo'
assertEquals b, 'b yo'
But obviously that's not going to work.
Upvotes: 3
Views: 1004