tags:

views:

21

answers:

1
def names = ["myname", "yourname", "theirname", "allnames"]

String n = ""
names.each{
    n += it + ","
}

println n

Output:

myname,yourname,theirname,allnames,

How do I get rid of the leading comma

+4  A: 
names.join(",")
jason